From 379e97cc1c0ac8539722a60a74986051de370f50 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 6 Nov 2017 15:02:50 -0500 Subject: [PATCH] Set _WIN32_WINNT to 0x501 for MinGW and (GH #529) --- socketft.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/socketft.cpp b/socketft.cpp index 454eaa57..20cda226 100644 --- a/socketft.cpp +++ b/socketft.cpp @@ -30,6 +30,14 @@ # include #endif +// From http://groups.google.com/d/msg/cryptopp-users/MzvocLrbIpE/TMCa6LFhCgAJ, +// is a compatibility header and it needs _WIN32_WINNT >= 0x501. +// The work-around should be OK since it won't cross-pollinate into header files. +#if defined(__MINGW32__) && (_WIN32_WINNT < 0x501) +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x501 +#endif + #ifdef USE_WINDOWS_STYLE_SOCKETS # pragma comment(lib, "ws2_32.lib") # if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x501)