From 89cbd3d2fa25a3efc8695464c10cab9557b51d3a Mon Sep 17 00:00:00 2001 From: V G Date: Thu, 20 Mar 2014 12:22:15 -0400 Subject: [PATCH] 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 --- src/windows.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/windows.hpp b/src/windows.hpp index f855698e..4f5d246d 100755 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -49,8 +49,8 @@ #include #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;