From df60856702158368022d366ec1ac7dd5102edc63 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 3 Apr 2018 19:40:11 +0200 Subject: [PATCH] Only redefine _WIN32_WINNT macro when < 0x0501 --- library/net_sockets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/net_sockets.c b/library/net_sockets.c index f99d339ff0..62f5b68ea6 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 #include