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)