From cf03aae45e7158c645f020580bc562817b2b4262 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 31 Jan 2014 08:26:39 +0000 Subject: [PATCH] scst: Build fix for Debian GNU/Linux 6.0 Avoid that building the iscsi-scst target driver fails as follows: iscsi-scst/kernel/isert-scst/iser_rdma.c: In function 'isert_portal_listen': iscsi-scst/kernel/isert-scst/iser_rdma.c:1450: error: implicit declaration of function 'pr_warn' git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5257 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_debug.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 22145e7bd..d7c689bf1 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -53,7 +53,6 @@ printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) #define pr_warning(fmt, ...) \ printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) -#define pr_warn pr_warning #define pr_notice(fmt, ...) \ printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) #endif @@ -68,6 +67,15 @@ printk(KERN_CONT fmt, ##__VA_ARGS__) #endif #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) +/* + * See also patch "kernel.h: add pr_warn for symmetry to dev_warn, + * netdev_warn" (commit fc62f2f19edf46c9bdbd1a54725b56b18c43e94f). + */ +#ifndef pr_warn +#define pr_warn pr_warning +#endif +#endif #if !defined(INSIDE_KERNEL_TREE) #ifdef CONFIG_SCST_DEBUG