From 811ff0f5a9f798a4af4c0d580ab433ce04f65c75 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 3 Sep 2014 10:50:52 +0000 Subject: [PATCH] scst: Refine r5751, the hex_to_bin() build fix for RHEL >= 6.1 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5753 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 5 +++-- scst/src/scst_lib.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 4512a6528..91016e5f5 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -242,8 +242,9 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) #endif #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ - (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 <= 6 && RHEL_MINOR -0 < 1) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 6 || \ + RHEL_MAJOR -0 == 6 && RHEL_MINOR -0 < 1) extern int hex_to_bin(char ch); #endif diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index b1be8e17c..f05ac814e 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -100,8 +100,9 @@ char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ - (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 <= 6 && RHEL_MINOR -0 < 1) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 6 || \ + RHEL_MAJOR -0 == 6 && RHEL_MINOR -0 < 1) /* * See also "lib: introduce common method to convert hex digits" (commit * 903788892ea0fc7fcaf7e8e5fac9a77379fc215b).