Commit 6eda79d0 authored by Max Kellermann's avatar Max Kellermann

system/EPollFD: add epoll_create1() fallback for Android

parent fb5cf8e3
...@@ -22,6 +22,21 @@ ...@@ -22,6 +22,21 @@
#include "EPollFD.hxx" #include "EPollFD.hxx"
#include "FatalError.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() EPollFD::EPollFD()
:fd(::epoll_create1(EPOLL_CLOEXEC)) :fd(::epoll_create1(EPOLL_CLOEXEC))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment