From: Markos Chandras <[email protected]>
Signed-off-by: Markos Chandras <[email protected]>
---
libc/sysdeps/linux/common/epoll.c | 10 ++++++++++
libc/sysdeps/linux/common/stubs.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/libc/sysdeps/linux/common/epoll.c
b/libc/sysdeps/linux/common/epoll.c
index f07ab94..3278f9d 100644
--- a/libc/sysdeps/linux/common/epoll.c
+++ b/libc/sysdeps/linux/common/epoll.c
@@ -87,5 +87,15 @@ int __libc_epoll_pwait(int epfd, struct epoll_event *events,
int maxevents,
}
# endif
}
+/*
+ * If epoll_wait is not defined, then call epoll_pwait instead using NULL
+ * for sigmask argument
+ */
+#if !defined(__NR_epoll_wait)
+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
weak_alias(__libc_epoll_pwait, epoll_pwait)
#endif
diff --git a/libc/sysdeps/linux/common/stubs.c
b/libc/sysdeps/linux/common/stubs.c
index 3b6df48..e96e458 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -89,7 +89,7 @@ make_stub(epoll_create)
make_stub(epoll_ctl)
#endif
-#ifndef __NR_epoll_wait
+#if !defined(__NR_epoll_wait) && !defined(__NR_epoll_pwait)
make_stub(epoll_wait)
#endif
--
1.8.0
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc