Skip to content
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

Use a working define for OpenBSD detection #503

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

blackgnezdo
Copy link
Contributor

This fixes "receives control messages for IPv6" test and more
importantly every other kind of ipv6 socket creation. E.g. this
no longer happens:

*Main> :m +*Network.Test.Common
*Network.Test.Common *Main> addr1:_ <- getAddrInfo Nothing (Just "::1") (Just "5000")
*Network.Test.Common *Main> sock <- socket (addrFamily addr1) (addrSocketType addr1) (addrProtocol addr1)
*** Exception: Network.Socket.setSockOpt: invalid argument (Invalid argument)

This fixes "receives control messages for IPv6" test and more
importantly every other kind of ipv6 socket creation. E.g. this
no longer happens:

*Main> :m +*Network.Test.Common
*Network.Test.Common *Main> addr1:_ <- getAddrInfo Nothing (Just "::1") (Just "5000")
*Network.Test.Common *Main> sock <- socket (addrFamily addr1) (addrSocketType addr1) (addrProtocol addr1)
*** Exception: Network.Socket.setSockOpt: invalid argument (Invalid argument)
@kazu-yamamoto kazu-yamamoto self-requested a review June 22, 2021 07:23
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@kazu-yamamoto kazu-yamamoto merged commit c47020e into haskell:master Jun 22, 2021
@kazu-yamamoto
Copy link
Collaborator

Merged. Thank you for your contribution!

Note that you can use openSocket for convenience.

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