system/EPollFD: add epoll_create1() fallback for Android
This commit is contained in:
parent
fb5cf8e3ac
commit
6eda79d02d
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user