diff options
author | wm4 <wm4@nowhere> | 2014-04-12 20:13:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-12 20:13:07 +0200 |
commit | 4e5cea86c29508c24bf6f5539eeddd388abfde0a (patch) | |
tree | 8fa1bd7cd9412a1024b272ba9f1e9756bf299657 /osdep | |
parent | 33f822b7154b8035984bd41607c0c2b1edd0c9fa (diff) | |
download | mpv-4e5cea86c29508c24bf6f5539eeddd388abfde0a.tar.bz2 mpv-4e5cea86c29508c24bf6f5539eeddd388abfde0a.tar.xz |
client API: add mpv_get_wakeup_pipe convenience function
Should make integreating with some event loops easier. Untested.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/io.c | 2 | ||||
-rw-r--r-- | osdep/io.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/osdep/io.c b/osdep/io.c index c243b39de4..26507eccfd 100644 --- a/osdep/io.c +++ b/osdep/io.c @@ -29,7 +29,7 @@ // On error, false is returned (and errno set). bool mp_set_cloexec(int fd) { -#if defined(FD_CLOEXEC) && defined(F_SETFD) +#if defined(F_SETFD) if (fd >= 0) { int flags = fcntl(fd, F_GETFD); if (flags == -1) diff --git a/osdep/io.h b/osdep/io.h index 5fa36abb1e..4cb16677f2 100644 --- a/osdep/io.h +++ b/osdep/io.h @@ -34,6 +34,9 @@ #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif +#ifndef FD_CLOEXEC +#define FD_CLOEXEC 0 +#endif bool mp_set_cloexec(int fd); |