diff --git a/scst/include/scst.h b/scst/include/scst.h index 4064966f9..a7f457c6c 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -39,7 +39,11 @@ #include #include +#ifdef GENERATING_UPSTREAM_PATCH +#include +#else #include +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #ifndef RHEL_RELEASE_CODE @@ -49,7 +53,11 @@ typedef _Bool bool; #define false 0 #endif +#ifdef GENERATING_UPSTREAM_PATCH +#include +#else #include "scst_sgv.h" +#endif /* * Version numbers, the same as for the kernel. diff --git a/scst/include/scst_user.h b/scst/include/scst_user.h index d4a743e5b..8f8bf4d49 100644 --- a/scst/include/scst_user.h +++ b/scst/include/scst_user.h @@ -22,7 +22,11 @@ #ifndef __SCST_USER_H #define __SCST_USER_H +#ifdef GENERATING_UPSTREAM_PATCH +#include +#else #include +#endif #define DEV_USER_NAME "scst_user" #define DEV_USER_PATH "/dev/" diff --git a/srpt/src/Makefile.in_kernel b/srpt/src/Makefile.in_kernel index cbb3eda0f..39390dcf1 100644 --- a/srpt/src/Makefile.in_kernel +++ b/srpt/src/Makefile.in_kernel @@ -1,3 +1 @@ -EXTRA_CFLAGS += -Iinclude/scst - obj-$(CONFIG_SCST_SRPT) += ib_srpt.o diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index d71a1b708..8397b903f 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -50,7 +50,11 @@ #endif #include "ib_srpt.h" #define LOG_PREFIX "ib_srpt" /* Prefix for SCST tracing macros. */ +#if defined(GENERATING_UPSTREAM_PATCH) +#include +#else #include "scst_debug.h" +#endif /* Name of this kernel module. */ #define DRV_NAME "ib_srpt" diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index 589021f5d..7d29cb78e 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -45,7 +45,11 @@ #include +#if defined(GENERATING_UPSTREAM_PATCH) +#include +#else #include +#endif #include "ib_dm_mad.h"