From b4d335cb9fc40572efd2414347e586c8590feb4e Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 1 Aug 2008 13:46:08 +0000 Subject: PR#4536: Add socket option IPV6_V6ONLY git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8968 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- otherlibs/win32unix/sockopt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'otherlibs/win32unix/sockopt.c') 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[] = { -- cgit v1.2.3-70-g09d2