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
This commit is contained in:
Bart Van Assche
2013-12-18 09:03:03 +00:00
parent f0ca74fc50
commit ebfe021cf1

View File

@@ -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)
{