From b47d6e3c8f0d54354952f7b5195ef5599afcd56c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 3 Dec 2014 17:41:09 +0000 Subject: [PATCH] Build fixes for RHEL 6.6 kernel 2.6.32-504 (merge r5908 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@5909 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/ft_sess.c | 4 +++- scst/src/scst_sysfs.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fcst/ft_sess.c b/fcst/ft_sess.c index 1690a87d1..81caf8bae 100644 --- a/fcst/ft_sess.c +++ b/fcst/ft_sess.c @@ -181,7 +181,9 @@ static u32 ft_sess_hash(u32 port_id) LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 41)) && \ ! (LINUX_VERSION_CODE >> 8 == KERNEL_VERSION(3, 2, 0) >> 8 && \ LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 44)) && \ - !defined(CONFIG_SUSE_KERNEL) + !defined(CONFIG_SUSE_KERNEL) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 6 || \ + (RHEL_MAJOR -0 == 6 && RHEL_MINOR -0 < 6)) /* * See also commit 4b20db3 (kref: Implement kref_get_unless_zero v3 -- v3.8). * See also commit e3a5505 in branch stable/linux-3.4.y (v3.4.41). diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 6ee2b2ef1..f87085045 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -313,7 +313,9 @@ out: #endif /* defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 6 || \ + (RHEL_MAJOR -0 == 6 && RHEL_MINOR -0 < 6)) /** ** Backported sysfs functions. **/