From 2b428054e6493edcf8375364134c7557836d7e11 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 5 Nov 2012 08:14:56 +0000 Subject: [PATCH] scst/include/scst_debug.h: RHEL 5 build fix git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4600 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_debug.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 467604dd4..9f3d02ccb 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -159,7 +159,13 @@ #define ___unlikely(a) unlikely(a) #endif -int __printf(6, 7) debug_print_with_prefix(unsigned long trace_flag, +int +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 21) || defined(__printf) +__printf(6, 7) +#else +__attribute__((format(printf, 6, 7))) +#endif +debug_print_with_prefix(unsigned long trace_flag, const char *severity, const char *prefix, const char *func, int line, const char *fmt, ...); void debug_print_buffer(const void *data, int len);