diff options
author | Emmanuel Durand <emmanueldurand@gmail.com> | 2012-11-27 15:34:19 -0500 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-11-28 13:04:30 +0100 |
commit | 1c973536b962e9d695d29d6a6a42c33aeec00db2 (patch) | |
tree | 62bebd3e3b6f3d1016eccf484db72bd92f51b383 /sys/shm/shmpipe.c | |
parent | 13910f515462282e61b499c288418534d5672316 (diff) | |
download | gstreamer-plugins-bad-1c973536b962e9d695d29d6a6a42c33aeec00db2.tar.gz |
shm: Fix compilation of shm on OSX
https://bugzilla.gnome.org/show_bug.cgi?id=689183
Diffstat (limited to 'sys/shm/shmpipe.c')
-rw-r--r-- | sys/shm/shmpipe.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c index c692417e1..4da027b72 100644 --- a/sys/shm/shmpipe.c +++ b/sys/shm/shmpipe.c @@ -27,6 +27,12 @@ #include "config.h" #endif +#ifdef HAVE_OSX +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL SO_NOSIGPIPE +#endif +#endif + #include "shmpipe.h" #include <sys/types.h> @@ -278,7 +284,11 @@ sp_open_shm (char *path, int id, mode_t perms, size_t size) if (path) flags = O_RDONLY; else +#ifdef HAVE_OSX + flags = O_RDWR | O_CREAT | O_EXCL; +#else flags = O_RDWR | O_CREAT | O_TRUNC | O_EXCL; +#endif area->shm_fd = -1; |