mirror of
https://github.com/apple/swift-nio
synced 2026-11-30 05:28:44 +00:00
Copy Android constants needed by Channel over to NIOCore too (#1924)
Motivation: Unbreak Android build from NIOCore not having these constants defined. Modifications: Copy the same constants that Channel was using in NIO over. Result: Android compiles again and the same tests pass.
This commit is contained in:
1 parent
e66b64e4e3
commit
74b3a8d6a0
1 file changed
+6
-1
@@ -68,9 +68,14 @@ private let sysInet_pton: @convention(c) (CInt, UnsafePointer<CChar>?, UnsafeMut
|
||||
#endif
|
||||
|
||||
// Work around SO_TIMESTAMP/SO_RCVTIMEO being awkwardly defined in glibc.
|
||||
#if os(Android) && arch(arm)
|
||||
#if os(Android)
|
||||
let IFF_BROADCAST: CUnsignedInt = numericCast(CNIOLinux.IFF_BROADCAST.rawValue)
|
||||
let IFF_POINTOPOINT: CUnsignedInt = numericCast(CNIOLinux.IFF_POINTOPOINT.rawValue)
|
||||
let IFF_MULTICAST: CUnsignedInt = numericCast(CNIOLinux.IFF_MULTICAST.rawValue)
|
||||
#if arch(arm)
|
||||
let SO_RCVTIMEO = SO_RCVTIMEO_OLD
|
||||
let SO_TIMESTAMP = SO_TIMESTAMP_OLD
|
||||
#endif
|
||||
#elseif os(Linux)
|
||||
let SO_TIMESTAMP = CNIOLinux_SO_TIMESTAMP
|
||||
let SO_RCVTIMEO = CNIOLinux_SO_RCVTIMEO
|
||||
|
||||
Reference in new issue
Block a user