-
Notifications
You must be signed in to change notification settings - Fork 190
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
IPV6_V6ONLY not recognized on Windows #31
Comments
This seems to be a bug in MingW, which doesn't define the IPV6_V6ONLY constant. Apparently there had been a patch submitted to fix this in 2008, but it was rejected due to licensing reasons: http://sourceforge.net/tracker/?func=detail&atid=302435&aid=2035902&group_id=2435 I guess we could try to build a workaround into the network library if this is an important issue to you, |
(Very high quality answer. I was expecting I would first be asked to post all sorts of intricate details and excerpts before someone got to say anything on the matter.) As I see no other way on Windows to have a single listening socket accept both IPv4 and IPv6 connections, I do believe it is a very important issue for me. If there is any other way to accept both IPv4 and IPv6 connections at the same port, I might use it as a temporary solution waiting for the workaround in the network library. |
I've created and pushed a patch to my repo: https://github.com/hreinhardt/network To test it you have to:
|
I just had time to test this and can confirm that it is working and leads to the expected behavior of being able to handle both IPv4 and IPv6 using a single socket. What is the chance this ends up in network-2.3.0.12 or above? Is there anything I can do on my end to make sure that it does? How did you know the socket option value of IPV6_V6ONLY to be 27? |
I've created a pull request so if Johan is happy with the patch, he will probably merge it in a few days. (I got the socket option number 27 from the SourceForge page I linked to above) |
2.3.0.12 fails to build on Windows due to
|
Gah! We need a Windows build bot! Anyone feel like setting one up? In the mean time I'll fix this. |
@CetinSert Fixed on the stable branch. If you test it I'll make another release. |
@tibbe I already have a Windows server I use for testing software. I am also meaning to set up build bots for Haskell projects targeting Windows, Linux and FreeBSD. Is there any build automation software already used by others on other operating systems? |
@CetinSert I build all my packages on the latest 3 versions of GHC on my Linux buildbot at http://ci.johantibell.com/ using Jenkins CI. |
@tibbe Your fix What needs to be done now:
Sorry for being a bit late with #34 causing |
@tibbe Jenkins seems to support all systems I can support today and even Mac OS X. Thanks a lot for your tip! |
@CetinSert Try now. |
@tibbe Builds and works without any hiccups! Tested with GHC 7.4 + |
2.3.0.13 uploaded. |
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx claims a same named option is actually exported on Windows but the
configure
script of thenetwork
package fails to recognize this and definesHAVE_DECL_IPV6_V6ONLY
0
.The text was updated successfully, but these errors were encountered: