[FFmpeg-cvslog] w32pthreads: Map MemoryBarrier to __sync_synchronize on mingw

Martin Storsjö git at videolan.org
Mon Nov 2 11:59:19 CET 2015


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Oct 28 22:20:43 2015 +0200| [407ac22322e5ce67996ec54ef619cafa4c9ceb78] | committer: Martin Storsjö

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ö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=407ac22322e5ce67996ec54ef619cafa4c9ceb78
---

 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"



More information about the ffmpeg-cvslog mailing list