system/EPollFD: add epoll_create1() fallback for Android

This commit is contained in:
Max Kellermann 2014-02-18 09:54:28 +01:00
parent fb5cf8e3ac
commit 6eda79d02d

View File

@ -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))
{