This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] linux epoll_wait: Include <sysdep-cancel.h>
- From: Luke Shumaker <lukeshu at lukeshu dot com>
- To: libc-alpha at sourceware dot org
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Thu, 9 Nov 2017 22:07:14 -0500
- Subject: [PATCH] linux epoll_wait: Include <sysdep-cancel.h>
- Authentication-results: sourceware.org; auth=none
The epoll_wait wrapper uses the raw syscall if __NR_epoll_wait is defined,
and falls back to calling epoll_pwait(..., NULL) if it isn't defined.
However, it didn't include the appropriate headers for __NR_epoll_wait to
be defined, so it was *always* falling back to calling epoll_pwait!
This mistake was introduced in b62c3815912bc679a966134affdedd3f35ae8621,
when epoll_wait changed from being in syscalls.list to always having a C
wrapper.
---
ChangeLog | 4 ++++
sysdeps/unix/sysv/linux/epoll_wait.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 475945bc32..807a826335 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-09 Luke Shumaker <lukeshu@parabola.nu>
+
+ * sysdeps/unix/sysv/linux/epoll_wait.c: Include <sysdep-cancel.h>.
+
2017-11-09 H.J. Lu <hongjiu.lu@intel.com>
* include/setjmp.h [!_ISOMAC]: Include <stddef.h> and
diff --git a/sysdeps/unix/sysv/linux/epoll_wait.c b/sysdeps/unix/sysv/linux/epoll_wait.c
index eb6e6d3ace..b324ff832a 100644
--- a/sysdeps/unix/sysv/linux/epoll_wait.c
+++ b/sysdeps/unix/sysv/linux/epoll_wait.c
@@ -21,6 +21,8 @@
#include <sys/types.h>
#include <sys/epoll.h>
+#include <sysdep-cancel.h>
+
int
epoll_wait (int epfd, struct epoll_event *events, int maxevents, int timeout)
{
--
2.15.0