diff --git a/src/win/thread.c b/src/win/thread.c index 56ca41aab..fd4b7c986 100644 --- a/src/win/thread.c +++ b/src/win/thread.c @@ -23,6 +23,12 @@ #include #include +#if defined(__MINGW64_VERSION_MAJOR) +/* MemoryBarrier expands to __mm_mfence in some cases (x86+sse2), which may + * require this header in some versions of mingw64. */ +#include +#endif + #include "uv.h" #include "internal.h"