mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
fcst: Rework the fc_fill_fc_hdr() compatibility check
Decide which SCSI header file to include based on a compile time check instead of trying to derive that choice from the UEK kernel version. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
KBUILD_EXTRA_SYMBOLS=$(src)/../scst/src/Module.symvers
|
||||
ccflags-y += -I$(src)/../scst/include $(shell ev=$$(basename $$(pwd)); echo "ev=$$ev" >&2; [ "$${ev/uek}" != "$${ev}" ] && ev=$${ev/*.el/} && echo -DUEK_RELEASE=$${ev/uek.*})
|
||||
ccflags-y += -I$(src)/../scst/include $(shell grep -qw fc_fill_fc_hdr $$(pwd)/include/scsi/fc_encode.h 2>/dev/null && echo -DFC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H)
|
||||
|
||||
obj-$(CONFIG_FCST) += fcst.o
|
||||
|
||||
|
||||
@@ -19,10 +19,15 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <scsi/libfc.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0) && !defined(UEK_RELEASE)
|
||||
/*
|
||||
* See also upstream commit e31ac898ac29 ("scsi: libfc: Move scsi/fc_encode.h
|
||||
* to libfc"). That commit moved fc_fill_fc_hdr() from <scsi/fc_encode.h> into
|
||||
* <scsi/fc_frame.h>.
|
||||
*/
|
||||
#if defined(FC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H)
|
||||
#include <scsi/fc_encode.h>
|
||||
#else
|
||||
#include <scsi/fc/fc_ms.h>
|
||||
#include <scsi/fc_frame.h>
|
||||
#endif
|
||||
#include "fcst.h"
|
||||
|
||||
|
||||
@@ -24,10 +24,15 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <scsi/libfc.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0) && !defined(UEK_RELEASE)
|
||||
/*
|
||||
* See also upstream commit e31ac898ac29 ("scsi: libfc: Move scsi/fc_encode.h
|
||||
* to libfc"). That commit moved fc_fill_fc_hdr() from <scsi/fc_encode.h> into
|
||||
* <scsi/fc_frame.h>.
|
||||
*/
|
||||
#if defined(FC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H)
|
||||
#include <scsi/fc_encode.h>
|
||||
#else
|
||||
#include <scsi/fc/fc_ms.h>
|
||||
#include <scsi/fc_frame.h>
|
||||
#endif
|
||||
#include "fcst.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user