From 4588200994adc3df41276568d052a4453facb5fc Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 6 Aug 2009 17:18:28 +0000 Subject: [PATCH] Patch from Bart Van Assche : Since SCST r979 the SRP target source code does no longer compile on RHEL / CentOS systems where OFED has been installed. This is because OFED has its own backported versions of the 2.6.20+ workqueue API and already includes a definition of cancel_delayed_work_sync(). The patch below makes sure that on RHEL 5 / CentOS 5 systems with OFED 1.4 installed the SCST definition of cancel_delayed_work_sync() does not conflict with the OFED definition of the same function. The patch below has been tested by verifying that the SRPT source code compiles and runs fine on CentOS 5.3 + OFED 1.4.1 and also on a system with a vanilla 2.6.30.4 kernel. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1023 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index c3fc63ac6..60cd14262 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -2869,7 +2869,7 @@ static inline int scst_get_in_buf_count(struct scst_cmd *cmd) return (cmd->in_sg_cnt == 0) ? 1 : cmd->in_sg_cnt; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) && !defined(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)) static inline int cancel_delayed_work_sync(struct delayed_work *work) #else