Skip to content

Defensively unify CSocket imports #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gregcotten
Copy link

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

@gregcotten
Copy link
Author

care to pull these changes in?

@gregcotten
Copy link
Author

@colemancda, now that Swift 6.1 is generally available, anyone trying to use this package on Linux will be met with these build errors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants