diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-12-26 16:57:21 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-12-26 21:13:10 +0100 |
commit | c7f9c060e4dbca0a9ebe1eab63e1e64c317e3349 (patch) | |
tree | 430f8a1e27e0ccbcb39a7feae7f21a4fbe6c0aff | |
parent | dbf879be140472e370cf5074c9c0a1959eb4533b (diff) | |
download | mpv-c7f9c060e4dbca0a9ebe1eab63e1e64c317e3349.tar.bz2 mpv-c7f9c060e4dbca0a9ebe1eab63e1e64c317e3349.tar.xz |
build: fix shm detection on OpenBSD
Fixes #427
-rwxr-xr-x | old-configure | 13 | ||||
-rw-r--r-- | video/out/vo_xv.c | 1 | ||||
-rw-r--r-- | wscript | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/old-configure b/old-configure index f4baba7ee1..5a7f1880d7 100755 --- a/old-configure +++ b/old-configure @@ -1504,8 +1504,19 @@ echores "$_termios" echocheck "shm" if test "$_shm" = auto ; then + cat > $TMPC << EOF +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +int main(void) { + shmget(0, 0, 0); + shmat(0, 0, 0); + shmctl(0, 0, 0); + return 0; +} +EOF _shm=no - statement_check sys/shm.h 'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)' && _shm=yes + cc_check && _shm=yes fi if test "$_shm" = yes ; then def_shm='#define HAVE_SHM 1' diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index ff5cfdbcd3..43a98a7068 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -34,6 +34,7 @@ #include "config.h" #if HAVE_SHM && HAVE_XEXT +#include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <X11/extensions/XShm.h> @@ -138,7 +138,7 @@ iconv support use --disable-iconv.", }, { 'name': '--shm', 'desc': 'shm', - 'func': check_statement('sys/shm.h', + 'func': check_statement(['sys/types.h', 'sys/ipc.h', 'sys/shm.h'], 'shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0)') }, { 'name': 'posix-select', |