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:
Bart Van Assche
2021-11-25 00:39:17 +00:00
parent 49870b2348
commit 5e313fddf4
3 changed files with 15 additions and 5 deletions
+7 -2
View File
@@ -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"