Inserted #if guard for s390x
This commit is contained in:
@@ -153,11 +153,13 @@ public extension fd_set {
|
||||
@inline(__always)
|
||||
private static func address(for fd: Int32) -> (Int, Int32) {
|
||||
var intOffset = Int(fd) / __fd_set_count
|
||||
if (intOffset % 2 == 0) {
|
||||
intOffset += 1
|
||||
} else {
|
||||
intOffset -= 1
|
||||
}
|
||||
#if arch(s390x)
|
||||
if (intOffset % 2 == 0) {
|
||||
intOffset += 1
|
||||
} else {
|
||||
intOffset -= 1
|
||||
}
|
||||
#endif
|
||||
let bitOffset = Int(fd) % __fd_set_count
|
||||
let mask = Int32(bitPattern: UInt32(1 << bitOffset))
|
||||
return (intOffset, mask)
|
||||
|
||||
Reference in New Issue
Block a user