mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
Unfortunately the latest InfiniBand software is not included in Linux
distributions but must be installed separately via the OFED package. The patch below makes it easier to compile SCST-SRPT with the OFED kernel headers by disabling the backported <linux/scatterlist.h> macro's when compiling with OFED kernel headers. OFED namely has its own set of backported macro's. OFED kernel headers are detected via the preprocessor symbol __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__, which is defined in the OFED header file <linux/scatterlist.h> only. This patch does not have any effect when compiling SCST on a system where OFED has not been installed. Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@824 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2657,6 +2657,17 @@ void scst_aen_done(struct scst_aen *aen);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
|
||||
|
||||
/*
|
||||
* The macro's sg_page(), sg_virt(), sg_init_table(), sg_assign_page() and
|
||||
* sg_set_page() have been introduced in the 2.6.24 kernel. The definitions
|
||||
* below are backports of the 2.6.24 macro's for older kernels. There is one
|
||||
* exception however: when compiling SCST on a system with a pre-2.6.24 kernel
|
||||
* (e.g. RHEL 5.x) where the OFED kernel headers have been installed, do not
|
||||
* define the backported macro's because OFED has already defined these.
|
||||
*/
|
||||
|
||||
#ifndef __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__
|
||||
|
||||
static inline struct page *sg_page(struct scatterlist *sg)
|
||||
{
|
||||
return sg->page;
|
||||
@@ -2685,6 +2696,8 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page,
|
||||
sg->length = len;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) */
|
||||
|
||||
static inline void sg_clear(struct scatterlist *sg)
|
||||
|
||||
Reference in New Issue
Block a user