From 34c12082023edd06a7274d66b35f7c5b45fe4548 Mon Sep 17 00:00:00 2001 From: Lynix Date: Mon, 19 Sep 2016 13:16:16 +0200 Subject: [PATCH] Network/Windows: Fix compilation with MinGW Thanks to Maeiky Former-commit-id: 06501a2d834a10fad4db902b2a5015e6ac7a1fd8 [formerly f2ae3e67ba3fec2d8c740a4472b6fd32aa601a41] [formerly a13631a0e24cb5518e132d450c8d099f985d3fb2 [formerly 0b3ed439870f29acf33c6a6cfbbe8747fc3394ff]] Former-commit-id: 04e5439cd9d14ac7de4a5b126b0359aee42b0bd1 [formerly 6cab591aa8cf90d4ab3ddf6a883023caf1694b4d] Former-commit-id: fe7895dc9cd1c1f54a2c0b7df1d578220e06b180 --- src/Nazara/Network/Win32/SocketImpl.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Nazara/Network/Win32/SocketImpl.cpp b/src/Nazara/Network/Win32/SocketImpl.cpp index f35a4a078..5f1c84ba8 100644 --- a/src/Nazara/Network/Win32/SocketImpl.cpp +++ b/src/Nazara/Network/Win32/SocketImpl.cpp @@ -7,18 +7,21 @@ #include #include -#include - +#if defined(NAZARA_COMPILER_MINGW) && __GNUC__ < 5 // Some compilers (olders versions of MinGW) are lacking Mstcpip.h which defines the following struct/#define -// Define them ourself for now struct tcp_keepalive { - u_long onoff; - u_long keepalivetime; - u_long keepaliveinterval; + u_long onoff; + u_long keepalivetime; + u_long keepaliveinterval; }; #define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4) +#else +#include +#endif + +#include #include