From 76edd32ceb4b4bec3fc8d40abde5b802208297a3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 19 Dec 2018 14:55:58 +0000 Subject: [PATCH 1/2] scst: Avoid that RHEL 7.6 complains about WRITE_VERIFY_16 being redefined RHEL7.6 backported the WRITE_VERIFY_16 macro to their 3.10 based kernel (3.10.0-957.*), so do not define WRITE_VERIFY_16 on RHEL7.6 and above. Reported-by: Tomohiro Kusumi git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7842 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_const.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index c4acfa171..cb0caa2ea 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -371,7 +371,8 @@ static inline int scst_sense_response_code(const uint8_t *sense) && (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 <= 5) #define WRITE_ATTRIBUTE 0x8D #endif -#if !defined(__KERNEL__) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) +#if (!defined(__KERNEL__) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)) &&\ + !defined(WRITE_VERIFY_16) #define WRITE_VERIFY_16 0x8E #endif #define VERIFY_6 0x13 From d10a90d0ba7a424822c6b9beb7300385d2ef54ad Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 19 Dec 2018 14:59:47 +0000 Subject: [PATCH 2/2] scst: Fix RHEL 7.6 'EPOLLHUP undeclared' build error Avoid that the following is reported when compiling scst on RHEL 7.6: scst/iscsi-scst/kernel/isert-scst/isert_login.c:843:11: error: 'EPOLLHUP' undeclared (first use in this function) mask |= EPOLLHUP | EPOLLIN; Signed-off-by: Tomohiro Kusumi git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7843 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 72532b189..30e84d855 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -310,24 +310,46 @@ typedef unsigned int __poll_t; #define EPOLLNVAL POLLNVAL #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) && !defined(EPOLLIN) /* * See also commit 7e040726850a ("eventpoll.h: add missing epoll event masks"). * Note: this commit got backported to multiple stable kernels, including * v3.18.93. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) +#if !defined(EPOLLIN) #define EPOLLIN POLLIN +#endif +#if !defined(EPOLLPRI) #define EPOLLPRI POLLPRI +#endif +#if !defined(EPOLLOUT) #define EPOLLOUT POLLOUT +#endif +#if !defined(EPOLLERR) #define EPOLLERR POLLERR +#endif +#if !defined(EPOLLHUP) #define EPOLLHUP POLLHUP +#endif +#if !defined(EPOLLRDNORM) #define EPOLLRDNORM POLLRDNORM +#endif +#if !defined(EPOLLRDBAND) #define EPOLLRDBAND POLLRDBAND +#endif +#if !defined(EPOLLWRNORM) #define EPOLLWRNORM POLLWRNORM +#endif +#if !defined(EPOLLWRBAND) #define EPOLLWRBAND POLLWRBAND +#endif +#if !defined(EPOLLMSG) #define EPOLLMSG POLLMSG +#endif +#if !defined(EPOLLRDHUP) #define EPOLLRDHUP POLLRDHUP #endif +#endif /* */