workaround missing Mstcpip.h in mingw32

This commit is contained in:
KIU Shueng Chuan 2014-02-18 21:24:24 +08:00
parent 3b8254daed
commit acf0949f18

View File

@ -45,10 +45,20 @@
#include <windows.h>
#include <mswsock.h>
#if !defined __MINGW64_VERSION_MAJOR && !defined __MINGW64_VERSION_MINOR
#if !defined __MINGW32__
#include <Mstcpip.h>
#endif
// Workaround missing Mstcpip.h in mingw32
#if defined __MINGW32__ && !defined SIO_KEEPALIVE_VALS
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>
#if !defined _WIN32_WCE