From 9671e412feedb90325e038c3aaf5d543eebc20c0 Mon Sep 17 00:00:00 2001 From: derselbst Date: Fri, 22 Feb 2019 10:15:18 +0100 Subject: [PATCH] fix build with MinGW --- src/utils/fluid_sys.c | 6 ++++++ src/utils/fluid_sys.h | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/utils/fluid_sys.c b/src/utils/fluid_sys.c index ee2fd677e..4a9babe19 100644 --- a/src/utils/fluid_sys.c +++ b/src/utils/fluid_sys.c @@ -30,6 +30,12 @@ #include "fluid_rtkit.h" #endif +#if HAVE_PTHREAD_H && !defined(WIN32) +// Do not include pthread on windows. It includes winsock.h, which collides with ws2tcpip.h from fluid_sys.h +// It isn't need on Windows anyway. +#include +#endif + /* WIN32 HACK - Flag used to differentiate between a file descriptor and a socket. * Should work, so long as no SOCKET or file descriptor ends up with this bit set. - JG */ #ifdef _WIN32 diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h index 3d5a61244..9f2d6f6c7 100644 --- a/src/utils/fluid_sys.h +++ b/src/utils/fluid_sys.h @@ -97,10 +97,6 @@ #include #endif -#if HAVE_PTHREAD_H -#include -#endif - #if HAVE_OPENMP #include #endif