Socket
Socket copied to clipboard
Defensively unify CSocket imports
Compiling with Swift 6.1 on Linux fails with stuff like
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:372:50: error: cannot find 'SOCK_STREAM' in scope
@_alwaysEmitIntoClient
internal var _SOCK_STREAM: CInterop.SocketType { SOCK_STREAM }
`- error: cannot find 'SOCK_STREAM' in scope
@_alwaysEmitIntoClient
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:375:49: error: cannot find 'SOCK_DGRAM' in scope
@_alwaysEmitIntoClient
internal var _SOCK_DGRAM: CInterop.SocketType { SOCK_DGRAM }
`- error: cannot find 'SOCK_DGRAM' in scope
@_alwaysEmitIntoClient
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:378:47: error: cannot find 'SOCK_RAW' in scope
@_alwaysEmitIntoClient
internal var _SOCK_RAW: CInterop.SocketType { SOCK_RAW }
`- error: cannot find 'SOCK_RAW' in scope
@_alwaysEmitIntoClient
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:381:47: error: cannot find 'SOCK_RDM' in scope
@_alwaysEmitIntoClient
internal var _SOCK_RDM: CInterop.SocketType { SOCK_RDM }
`- error: cannot find 'SOCK_RDM' in scope
@_alwaysEmitIntoClient
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:384:53: error: cannot find 'SOCK_SEQPACKET' in scope
@_alwaysEmitIntoClient
internal var _SOCK_SEQPACKET: CInterop.SocketType { SOCK_SEQPACKET }
`- error: cannot find 'SOCK_SEQPACKET' in scope
#if os(Linux)
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:388:48: error: cannot find 'SOCK_DCCP' in scope
#if os(Linux)
@_alwaysEmitIntoClient
internal var _SOCK_DCCP: CInterop.SocketType { SOCK_DCCP }
`- error: cannot find 'SOCK_DCCP' in scope
@_alwaysEmitIntoClient
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:391:52: error: cannot find 'SOCK_NONBLOCK' in scope
@_alwaysEmitIntoClient
internal var _SOCK_NONBLOCK: CInterop.SocketType { SOCK_NONBLOCK }
`- error: cannot find 'SOCK_NONBLOCK' in scope
@_alwaysEmitIntoClient
/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:394:51: error: cannot find 'SOCK_CLOEXEC' in scope
@_alwaysEmitIntoClient
internal var _SOCK_CLOEXEC: CInterop.SocketType { SOCK_CLOEXEC }
`- error: cannot find 'SOCK_CLOEXEC' in scope
#endif
care to pull these changes in?
@colemancda, now that Swift 6.1 is generally available, anyone trying to use this package on Linux will be met with these build errors!
Sorry, just seeing this. I happened to fix this myself.