diff --git a/compat/mingw.h b/compat/mingw.h index 7d52d02f3c..6344d991e3 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -6,6 +6,12 @@ typedef _sigset_t sigset_t; #endif #include #include + +/* MinGW-w64 reports to have flockfile, but it does not actually have it. */ +#ifdef __MINGW64_VERSION_MAJOR +#undef _POSIX_THREAD_SAFE_FUNCTIONS +#endif + /* * things that are not available in header files */