From edadea8fd0fe5ad03f37815f3f30c762bc849113 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 5 Nov 2012 08:53:35 +0000 Subject: [PATCH] ib_srpt: RHEL 5.3 build fix git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4603 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index d157f0bc7..bb17794ea 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -56,6 +56,16 @@ #include "scst_debug.h" #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(WARN) +/* See also commit a8f18b909c0a3f22630846207035c8b84bb252b8 */ +#define WARN(condition, format...) do { \ + if (unlikely(condition)) { \ + printk(KERN_WARNING format); \ + WARN_ON(true); \ + } \ +} while(0); +#endif + /* Name of this kernel module. */ #define DRV_NAME "ib_srpt" #define DRV_VERSION "3.0.0-pre"