w32pthreads: Map MemoryBarrier to __sync_synchronize on mingw
authorMartin Storsjö <martin@martin.st>
Wed, 28 Oct 2015 20:20:43 +0000 (22:20 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 30 Oct 2015 18:15:11 +0000 (20:15 +0200)
This fixes building on older mingw (both mingw.org and mingw64;
mingw64 from before May 2011).

Signed-off-by: Martin Storsjö <martin@martin.st>
compat/w32pthreads.h

index 3bc69b3..2fe2a5a 100644 (file)
@@ -39,9 +39,9 @@
 #include <windows.h>
 #include <process.h>
 
-/* MinGW requires the intrinsics header for the pthread_once fallback code */
 #if _WIN32_WINNT < 0x0600 && defined(__MINGW32__)
-#include <intrin.h>
+#undef MemoryBarrier
+#define MemoryBarrier __sync_synchronize
 #endif
 
 #include "libavutil/attributes.h"