Module: libav
Branch: master
Commit: 407ac22322e5ce67996ec54ef619cafa4c9ceb78

Author:    Martin Storsjö <[email protected]>
Committer: Martin Storsjö <[email protected]>
Date:      Wed Oct 28 22:20:43 2015 +0200

w32pthreads: Map MemoryBarrier to __sync_synchronize on mingw

This fixes building on older mingw (both mingw.org and mingw64;
mingw64 from before May 2011).

Signed-off-by: Martin Storsjö <[email protected]>

---

 compat/w32pthreads.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index 3bc69b3..2fe2a5a 100644
--- a/compat/w32pthreads.h
+++ b/compat/w32pthreads.h
@@ -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"

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to