diff options
Diffstat (limited to 'otherlibs/win32unix')
-rw-r--r-- | otherlibs/win32unix/sockopt.c | 10 | ||||
-rw-r--r-- | otherlibs/win32unix/unix.ml | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/otherlibs/win32unix/sockopt.c b/otherlibs/win32unix/sockopt.c index 5fab2f6ff..f82d810e6 100644 --- a/otherlibs/win32unix/sockopt.c +++ b/otherlibs/win32unix/sockopt.c @@ -21,6 +21,13 @@ #include "unixsupport.h" #include "socketaddr.h" +#ifndef IPPROTO_IPV6 +#define IPPROTO_IPV6 (-1) +#endif +#ifndef IPV6_V6ONLY +#define IPV6_V6ONLY (-1) +#endif + enum option_type { TYPE_BOOL = 0, TYPE_INT = 1, @@ -44,7 +51,8 @@ static struct socket_option sockopt_bool[] = { { SOL_SOCKET, SO_DONTROUTE }, { SOL_SOCKET, SO_OOBINLINE }, { SOL_SOCKET, SO_ACCEPTCONN }, - { IPPROTO_TCP, TCP_NODELAY } + { IPPROTO_TCP, TCP_NODELAY }, + { IPPROTO_IPV6, IPV6_V6ONLY} }; static struct socket_option sockopt_int[] = { diff --git a/otherlibs/win32unix/unix.ml b/otherlibs/win32unix/unix.ml index 08f48ca98..2b4411659 100644 --- a/otherlibs/win32unix/unix.ml +++ b/otherlibs/win32unix/unix.ml @@ -556,6 +556,7 @@ type socket_bool_option = | SO_OOBINLINE | SO_ACCEPTCONN | TCP_NODELAY + | IPV6_ONLY type socket_int_option = SO_SNDBUF |