diff options
author | Antonin Décimo <antonin@tarides.com> | 2021-02-01 13:41:06 +0100 |
---|---|---|
committer | Antonin Décimo <antonin@tarides.com> | 2021-02-09 15:06:35 +0100 |
commit | b9b7b12f9e4ddf49b535df8878e40e44d7de5f4c (patch) | |
tree | 7b2052fa71923fa7bcb79cc9ec06918041b52f4b /otherlibs | |
parent | 6cb10440ed84b9bf8fe470e3dfb98d36643afc2f (diff) | |
download | ocaml-b9b7b12f9e4ddf49b535df8878e40e44d7de5f4c.tar.gz |
Remove tests for HAS_IPV6 in win32unix
IPv6 is always enabled on Windows.
Diffstat (limited to 'otherlibs')
-rw-r--r-- | otherlibs/win32unix/socket.c | 17 | ||||
-rw-r--r-- | otherlibs/win32unix/unixsupport.h | 2 |
2 files changed, 1 insertions, 18 deletions
diff --git a/otherlibs/win32unix/socket.c b/otherlibs/win32unix/socket.c index bf05a39581..49c5b86d94 100644 --- a/otherlibs/win32unix/socket.c +++ b/otherlibs/win32unix/socket.c @@ -17,14 +17,7 @@ #include "unixsupport.h" int socket_domain_table[] = { - PF_UNIX, PF_INET, -#if defined(HAS_IPV6) - PF_INET6 -#elif defined(PF_UNSPEC) - PF_UNSPEC -#else - 0 -#endif + PF_UNIX, PF_INET, PF_INET6 }; int socket_type_table[] = { @@ -35,14 +28,6 @@ CAMLprim value unix_socket(value cloexec, value domain, value type, value proto) { SOCKET s; - #ifndef HAS_IPV6 - /* IPv6 requires WinSock2, we must raise an error on PF_INET6 */ - if (Int_val(domain) >= sizeof(socket_domain_table)/sizeof(int)) { - win32_maperr(WSAEPFNOSUPPORT); - uerror("socket", Nothing); - } - #endif - s = socket(socket_domain_table[Int_val(domain)], socket_type_table[Int_val(type)], Int_val(proto)); diff --git a/otherlibs/win32unix/unixsupport.h b/otherlibs/win32unix/unixsupport.h index 09ebaca9f3..e9f2b6b85e 100644 --- a/otherlibs/win32unix/unixsupport.h +++ b/otherlibs/win32unix/unixsupport.h @@ -24,10 +24,8 @@ #include <process.h> #include <sys/types.h> #include <winsock2.h> -#ifdef HAS_IPV6 #include <ws2tcpip.h> #include <wspiapi.h> -#endif #ifdef __cplusplus extern "C" { |