summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-14 23:20:09 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-16 14:54:48 +0200
commit97be5d4d200755c5077684e6ea003d3c452b0b4a (patch)
treed5a5cebe8c8850a0909b29b6fad81b2965a1ca12 /compat
parente12908d71e7a0b0f61db5f28b6475a7843c07354 (diff)
downloadffmpeg-97be5d4d200755c5077684e6ea003d3c452b0b4a.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.
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 c25a191f21..3a2f68f2d5 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"