From c2f8864d90b2b4e48995fa5fb806ab3611a3f64c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 6 Nov 2018 03:11:44 +0000 Subject: [PATCH] scst/include/backport.h: Fix the backport git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7799 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index bd5cd22cc..f4e9e6846 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -301,22 +301,29 @@ enum { /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) -typedef unsigned int __bitwise __poll_t; +/* + * See also commit 65aaf87b3aa2 ("add EPOLLNVAL, annotate EPOLL... and + * event_poll->event"). + */ +typedef unsigned int __poll_t; +#define EPOLLNVAL POLLNVAL #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) -#define EPOLLIN (__force __poll_t)POLLIN -#define EPOLLPRI (__force __poll_t)POLLPRI -#define EPOLLOUT (__force __poll_t)POLLOUT -#define EPOLLERR (__force __poll_t)POLLERR -#define EPOLLHUP (__force __poll_t)POLLHUP -#define EPOLLNVAL (__force __poll_t)POLLNVAL -#define EPOLLRDNORM (__force __poll_t)POLLRDNORM -#define EPOLLRDBAND (__force __poll_t)POLLRDBAND -#define EPOLLWRNORM (__force __poll_t)POLLWRNORM -#define EPOLLWRBAND (__force __poll_t)POLLWRBAND -#define EPOLLMSG (__force __poll_t)POLLMSG -#define EPOLLRDHUP (__force __poll_t)POLLRDHUP +/* + * See also commit 7e040726850a ("eventpoll.h: add missing epoll event masks"). + */ +#define EPOLLIN POLLIN +#define EPOLLPRI POLLPRI +#define EPOLLOUT POLLOUT +#define EPOLLERR POLLERR +#define EPOLLHUP POLLHUP +#define EPOLLRDNORM POLLRDNORM +#define EPOLLRDBAND POLLRDBAND +#define EPOLLWRNORM POLLWRNORM +#define EPOLLWRBAND POLLWRBAND +#define EPOLLMSG POLLMSG +#define EPOLLRDHUP POLLRDHUP #endif /* */