summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/epoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/epoll.c')
-rw-r--r--libc/sysdeps/linux/common/epoll.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c
index b7366262a..5f1e589e9 100644
--- a/libc/sysdeps/linux/common/epoll.c
+++ b/libc/sysdeps/linux/common/epoll.c
@@ -55,4 +55,15 @@ static int __NC(epoll_pwait)(int epfd, struct epoll_event *events, int maxevents
CANCELLABLE_SYSCALL(int, epoll_pwait, (int epfd, struct epoll_event *events, int maxevents, int timeout,
const sigset_t *set),
(epfd, events, maxevents, timeout, set))
+/*
+ * If epoll_wait is not defined, then call epoll_pwait instead using NULL
+ * for sigmask argument
+ */
+# ifndef __NR_epoll_wait
+# include <stddef.h>
+int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
+{
+ return INLINE_SYSCALL(epoll_pwait, 5, epfd, events, maxevents, timeout, NULL);
+}
+# endif
#endif