From 2db5211667a2a7df23a50847e575b4e40c62fc54 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 10 Sep 2010 06:54:23 +0000 Subject: [PATCH] scst_local compiles again without triggering a compiler warning on kernels 2.6.27 and before. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2082 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 036a625b8..f3feb245c 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -97,7 +97,12 @@ static atomic_t num_aborts = ATOMIC_INIT(0); static atomic_t num_dev_resets = ATOMIC_INIT(0); static atomic_t num_target_resets = ATOMIC_INIT(0); -bool scst_local_add_default_tgt; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 27) \ + || defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 5 +static int scst_local_add_default_tgt; +#else +static bool scst_local_add_default_tgt; +#endif module_param_named(add_default_tgt, scst_local_add_default_tgt, bool, S_IRUGO); MODULE_PARM_DESC(add_default_host, "add or not (default) on start default " "target scst_local_tgt with default session scst_local_host");