summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/sockopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix/sockopt.c')
-rw-r--r--otherlibs/win32unix/sockopt.c10
1 files changed, 9 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[] = {