commit | df60856702158368022d366ec1ac7dd5102edc63 | [log] [tgz] |
---|---|---|
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | Tue Apr 03 19:40:11 2018 +0200 |
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | Fri Apr 06 18:07:53 2018 +0200 |
tree | 799f6a8b6e1488a2ca8de449771cecfdcfe07256 | |
parent | 80aa3b8d6509be24cb67454e7a0519da20951faf [diff] [blame] |
Only redefine _WIN32_WINNT macro when < 0x0501
diff --git a/library/net_sockets.c b/library/net_sockets.c index f99d339..62f5b68 100644 --- a/library/net_sockets.c +++ b/library/net_sockets.c
@@ -47,11 +47,12 @@ #define IS_EINTR( ret ) ( ( ret ) == WSAEINTR ) -#ifdef _WIN32_WINNT +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501) #undef _WIN32_WINNT -#endif /* Enables getaddrinfo() & Co */ #define _WIN32_WINNT 0x0501 +#endif + #include <ws2tcpip.h> #include <winsock2.h>