From ebfe021cf12f6bf8c59a9cc05ce4ddafcc545764 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 18 Dec 2013 09:03:03 +0000 Subject: [PATCH] scst: RHEL 5 build fixes (merge r5146 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@5149 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scst/include/scst.h b/scst/include/scst.h index 874507dbe..78e04aec3 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -73,6 +73,12 @@ typedef _Bool bool; #include "scst_sgv.h" #endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) +#ifndef __printf +#define __printf(a, b) __attribute__((format(printf,a,b))) +#endif +#endif + #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) && !defined(BACKPORT_LINUX_CPUMASK_H) #define nr_cpu_ids NR_CPUS #endif @@ -3611,6 +3617,8 @@ static inline struct scatterlist *sg_chain_ptr(struct scatterlist *sg) return NULL; } +#define sg_is_last(sg) false + #ifndef sg_page static inline struct page *sg_page(struct scatterlist *sg) {