From 9e8b08cd4076065cb40ab0144d76223f62673e01 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 28 Dec 2011 03:54:03 +0000 Subject: [PATCH] Avoid that the compiler warns about READ_ATTRIBUTE and WRITE_ATTRIBUTE already being defined in on RHEL 6.0, 6.1 and 6.2. BSD-signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4032 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_const.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index c0d32480b..d717cc39b 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -276,11 +276,13 @@ enum scst_cdb_flags { #define INIT_ELEMENT_STATUS 0x07 #define INIT_ELEMENT_STATUS_RANGE 0x37 #define PREVENT_ALLOW_MEDIUM 0x1E -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) \ + && (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 <= 5) #define READ_ATTRIBUTE 0x8C #endif #define REQUEST_VOLUME_ADDRESS 0xB5 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) \ + && (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 <= 5) #define WRITE_ATTRIBUTE 0x8D #endif #define WRITE_VERIFY_16 0x8E