diff options
author | Max Kellermann <max@duempel.org> | 2014-02-18 09:54:28 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-18 09:54:35 +0100 |
commit | 6eda79d02d3f73d79ecd78cf18aba053973a9652 (patch) | |
tree | d9f5851e1bb2d6395f56a8134c9c4d81279f58bf | |
parent | fb5cf8e3acb94fbab80230a1878bd7360797376e (diff) | |
download | mpd-6eda79d02d3f73d79ecd78cf18aba053973a9652.tar.gz mpd-6eda79d02d3f73d79ecd78cf18aba053973a9652.tar.xz mpd-6eda79d02d3f73d79ecd78cf18aba053973a9652.zip |
system/EPollFD: add epoll_create1() fallback for Android
Diffstat (limited to '')
-rw-r--r-- | src/system/EPollFD.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/system/EPollFD.cxx b/src/system/EPollFD.cxx index 16787a50b..43e74712f 100644 --- a/src/system/EPollFD.cxx +++ b/src/system/EPollFD.cxx @@ -22,6 +22,21 @@ #include "EPollFD.hxx" #include "FatalError.hxx" +#ifdef __BIONIC__ + +#include <sys/syscall.h> +#include <fcntl.h> + +#define EPOLL_CLOEXEC O_CLOEXEC + +static inline int +epoll_create1(int flags) +{ + return syscall(__NR_epoll_create1, flags); +} + +#endif + EPollFD::EPollFD() :fd(::epoll_create1(EPOLL_CLOEXEC)) { |