Skip to content

Commit

Permalink
htons fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Feb 5, 2016
1 parent d0b57c0 commit fe65da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Socket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public class Socket: Hashable, Equatable {

private class func htonsPort(port: in_port_t) -> in_port_t {
#if os(Linux)
return port.bigEndian
return port.bigEndian //use htons() when llvm stops crashing
#else
let isLittleEndian = Int(OSHostByteOrder()) == OSLittleEndian
return isLittleEndian ? _OSSwapInt16(port) : port
Expand Down

0 comments on commit fe65da1

Please sign in to comment.