Skip to content

Commit

Permalink
fix build with MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Feb 22, 2019
1 parent 9ca9a57 commit 9671e41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/utils/fluid_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pthread.h>
#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
Expand Down
4 changes: 0 additions & 4 deletions src/utils/fluid_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@
#include <limits.h>
#endif

#if HAVE_PTHREAD_H
#include <pthread.h>
#endif

#if HAVE_OPENMP
#include <omp.h>
#endif
Expand Down

0 comments on commit 9671e41

Please sign in to comment.