From 8de43829d7cab4f9c5445f03fb41231e920c42eb Mon Sep 17 00:00:00 2001 From: Greg KH Date: Wed, 8 Mar 2017 19:03:03 +0100 Subject: [PATCH] eventpoll.h: fix epoll event masks [resend due to me forgetting to cc: linux-api the first time around I posted these back on Feb 23] From: Greg Kroah-Hartman When userspace tries to use these defines, it complains that it needs to be an unsigned 1 that is shifted, so libc implementations have to create their own version. Fix this by defining it properly so that libcs can just use the kernel uapi header. Change-Id: Iac4e9f2a30ef3ea444c984c9eb8d6c5edc1f8264 Reported-by: Elliott Hughes Signed-off-by: Greg Kroah-Hartman Git-commit: 6f051e4a685b768f3704c7c069aa1edee3010622 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Prasad Sodagudi [schikk@codeaurora.org: resolved merge conflicts] Signed-off-by: Swetha Chikkaboraiah --- include/uapi/linux/eventpoll.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h index b9670d44654a..6016e9ed0960 100644 --- a/include/uapi/linux/eventpoll.h +++ b/include/uapi/linux/eventpoll.h @@ -39,6 +39,9 @@ #define EPOLLMSG 0x00000400 #define EPOLLRDHUP 0x00002000 +/* Set exclusive wakeup mode for the target file descriptor */ +#define EPOLLEXCLUSIVE (1U << 28) + /* * Request the handling of system wakeup events so as to prevent system suspends * from happening while those events are being processed. @@ -49,13 +52,13 @@ * * Requires CAP_BLOCK_SUSPEND */ -#define EPOLLWAKEUP (1 << 29) +#define EPOLLWAKEUP (1U << 29) /* Set the One Shot behaviour for the target file descriptor */ -#define EPOLLONESHOT (1 << 30) +#define EPOLLONESHOT (1U << 30) /* Set the Edge Triggered behaviour for the target file descriptor */ -#define EPOLLET (1 << 31) +#define EPOLLET (1U << 31) /* * On x86-64 make the 64bit structure have the same alignment as the