diff --git a/fcst/Kbuild b/fcst/Kbuild index 1762fa4a0..f7b6dd2a1 100644 --- a/fcst/Kbuild +++ b/fcst/Kbuild @@ -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 diff --git a/fcst/ft_cmd.c b/fcst/ft_cmd.c index 9b9eac7f6..a868eaec2 100644 --- a/fcst/ft_cmd.c +++ b/fcst/ft_cmd.c @@ -19,10 +19,15 @@ #include #include #include -#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 into + * . + */ +#if defined(FC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H) #include #else -#include +#include #endif #include "fcst.h" diff --git a/fcst/ft_io.c b/fcst/ft_io.c index 9e202517d..face322fe 100644 --- a/fcst/ft_io.c +++ b/fcst/ft_io.c @@ -24,10 +24,15 @@ #include #include #include -#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 into + * . + */ +#if defined(FC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H) #include #else -#include +#include #endif #include "fcst.h"