diff options
author | wm4 <wm4@nowhere> | 2014-09-20 04:18:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-20 04:18:40 +0200 |
commit | 34fac3bf68f4787508648b6236d3d18059ba8775 (patch) | |
tree | 9ae53693d4303f2af1ee17c21bde13ebba966b7c /osdep/semaphore.h | |
parent | 73291014788d6a6617a08887ebc311a136450c09 (diff) | |
download | mpv-34fac3bf68f4787508648b6236d3d18059ba8775.tar.bz2 mpv-34fac3bf68f4787508648b6236d3d18059ba8775.tar.xz |
osdep: hack to fix build with low quality pthreads-w32 headers
When compiling semaphore_osx.c on win32, the following error happened:
/usr/i686-w64-mingw32/include/semaphore.h:160:6: error: unknown type name 'mode_t'
This is because this system header references symbols that are not
not defined anywhere. This is clearly a bug in pthreads-w32, but has
been known and unfixed since 2012, so add a hack to fix it.
We build semaphore_osx.c this way because it saves us an extra configure
check. On win32, Linux, etc. it's empty and contains
"#include <semaphore.h>" only.
Should fix #1108.
Diffstat (limited to 'osdep/semaphore.h')
-rw-r--r-- | osdep/semaphore.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/osdep/semaphore.h b/osdep/semaphore.h index 832f059df4..cad2f7fb1f 100644 --- a/osdep/semaphore.h +++ b/osdep/semaphore.h @@ -1,6 +1,7 @@ #ifndef MP_SEMAPHORE_H_ #define MP_SEMAPHORE_H_ +#include <sys/types.h> #include <semaphore.h> // OSX provides non-working empty stubs, so we emulate them. |