summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/epoll.c
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2012-10-11 10:12:24 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-02-20 13:45:11 +0100
commit257323e525f0cc2774bea4823b3518d0dce87142 (patch)
tree2b68e1361e13b6ea415393702d172a0131f39e52 /libc/sysdeps/linux/common/epoll.c
parentdde074b3905cce833e1cdca591174454e046083e (diff)
epoll: Use epoll_create1 if arch does not have the epoll_create syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common/epoll.c')
-rw-r--r--libc/sysdeps/linux/common/epoll.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c
index 29b4600d1..b7366262a 100644
--- a/libc/sysdeps/linux/common/epoll.c
+++ b/libc/sysdeps/linux/common/epoll.c
@@ -19,6 +19,14 @@ _syscall1(int, epoll_create, int, size)
_syscall1(int, epoll_create1, int, flags)
#endif
+#if defined __NR_epoll_create1 && !defined __NR_epoll_create
+int epoll_create(int size)
+{
+ return INLINE_SYSCALL(epoll_create1, 1, 0);
+}
+
+#endif
+
#ifdef __NR_epoll_ctl
_syscall4(int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
#endif