From: vlnb Date: Thu, 6 Aug 2009 17:18:28 +0000 (+0000) Subject: Patch from Bart Van Assche : X-Git-Url: http://git.etherboot.org/mirror/scst/.git/commitdiff_plain/e3cfa5f4af9354dca55f3336b083fc590a51eb8d 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: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1023 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- diff --git a/scst/include/scst.h b/scst/include/scst.h index c3fc63a..60cd142 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