Fix building on MinGW64 Windows

Mingw64 provides mstcpip.h and the build fails (redefinition) if the struct tcp_keepalive is redefined. Do not define the struct if __MINGW64__ is defined. Note that I had to manually pass the compile definition to cmake: -D__MINGW64__=1
This commit is contained in:
V G 2014-03-20 12:22:15 -04:00
parent faacb1413f
commit 89cbd3d2fa

View File

@ -49,8 +49,8 @@
#include <Mstcpip.h>
#endif
// Workaround missing Mstcpip.h in mingw32
#if defined __MINGW32__ && !defined SIO_KEEPALIVE_VALS
// Workaround missing Mstcpip.h in mingw32 (MinGW64 provides this)
#if defined __MINGW32__ && !defined SIO_KEEPALIVE_VALS && !defined __MINGW64__
struct tcp_keepalive {
u_long onoff;
u_long keepalivetime;