summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-14 23:18:17 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-16 17:46:41 +0200
commit68e00ad66d13c57d9eb3a3862b44ab3fb030e19f (patch)
treef969affb560f74f058ec5d4a161a8111104663c5 /compat
parentb52307933b576eba741c80108c3dad09eb48ba12 (diff)
downloadffmpeg-streaming-68e00ad66d13c57d9eb3a3862b44ab3fb030e19f.zip
ffmpeg-streaming-68e00ad66d13c57d9eb3a3862b44ab3fb030e19f.tar.gz
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. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'compat')
-rw-r--r--compat/w32pthreads.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index ac9a814..3bc69b3 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/internal.h"
#include "libavutil/mem.h"
OpenPOWER on IntegriCloud