From 842253f87eb8ebdfe6b80c364e9400e1fe33aef6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 24 Sep 2019 21:44:01 +0000 Subject: [PATCH] scst: Port to RHEL 7.7 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8586 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 989fc33b5..4dbc9536c 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -908,6 +908,8 @@ static inline void *kvzalloc(size_t size, gfp_t flags) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \ + RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 7) && \ !defined(_COMPAT_LINUX_MM_H) /* See also commit 1c542f38ab8d ("mm: Introduce kvcalloc()") # v4.18. */ static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) @@ -1136,7 +1138,9 @@ typedef void (*rcu_callback_t)(struct rcu_head *); __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \ + RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 7) /* * See also commit 546a9d8519ed ("rcu: Export debug_init_rcu_head() and and * debug_init_rcu_head()") # v3.16. @@ -1588,7 +1592,9 @@ static inline int scsi_bidi_cmnd(struct scsi_cmnd *cmd) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \ + RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 7) /* See also commit b54197c43db8 ("virtio_scsi: use cmd_size") # v3.16. */ static inline void *scsi_cmd_priv(struct scsi_cmnd *cmd) {