Browse Source

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>
tags/n3.0
Hendrik Leppkes Luca Barbato 9 years ago
parent
commit
68e00ad66d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      compat/w32pthreads.h

+ 5
- 0
compat/w32pthreads.h View File

@@ -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"


Loading…
Cancel
Save