[FFmpeg-cvslog] w32pthreads: fix mingw build on x86 with -msse2 or higher
Hendrik Leppkes
git at videolan.org
Fri Oct 16 14:55:44 CEST 2015
ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Wed Oct 14 23:20:09 2015 +0200| [97be5d4d200755c5077684e6ea003d3c452b0b4a] | committer: Hendrik Leppkes
w32pthreads: fix mingw build on x86 with -msse2 or higher
When SSE2 or higher compiler optimizations are used, mingw uses
the _mm_mfence intrinsic for MemoryBarrier, however it doesn't include
the appropriate headers automatically.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97be5d4d200755c5077684e6ea003d3c452b0b4a
---
compat/w32pthreads.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index c25a191..3a2f68f 100644
--- a/compat/w32pthreads.h
+++ b/compat/w32pthreads.h
@@ -39,6 +39,11 @@
#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>
+#endif
+
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
More information about the ffmpeg-cvslog
mailing list