Merge pull request #76 from mditzel/master

Fix issue #75
This commit is contained in:
Pieter Hintjens 2014-04-14 14:02:11 +02:00
commit 4f4723a684

View File

@ -152,8 +152,6 @@
#define _WIN32_WINNT 0x0501
#endif
#include <windows.h>
#ifdef __MINGW32__
// Require Windows XP or higher with MinGW for getaddrinfo().
#if(_WIN32_WINNT >= 0x0501)
@ -164,8 +162,24 @@
#endif
#include <winsock2.h>
#include <windows.h>
#include <mswsock.h>
#if !defined __MINGW32__
#include <Mstcpip.h>
#endif
// Workaround missing Mstcpip.h in mingw32 (MinGW64 provides this)
// __MINGW64_VERSION_MAJOR is only defined (through inclusion of private _mingw.h via
// windows.h) in mingw-w64
#if defined __MINGW32__ && !defined SIO_KEEPALIVE_VALS && !defined __MINGW64_VERSION_MAJOR
struct tcp_keepalive {
u_long onoff;
u_long keepalivetime;
u_long keepaliveinterval;
};
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
#endif
#include <ws2tcpip.h>
#include <ipexport.h>