If we configure Lustre with --disable-modules that means we want
to use the native Linux Lustre / LNet UAPI headers instead. To do
this only include OpenSFS UAPI header path when Lustre modules are
enabled.
Change-Id: Id0f4d960d51bf02a6e24d2e3ad2544df10384533
Test-Parameters: trivial
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/38370
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
], [*], [
# This is strange - Lustre supports a target we don't
AC_MSG_ERROR([Modules are not supported on $target_os])
], [*], [
# This is strange - Lustre supports a target we don't
AC_MSG_ERROR([Modules are not supported on $target_os])
+ # Use OpenSFS UAPI header path instead of linux kernel
+ CPPFLAGS="-I$PWD/lnet/include/uapi -I$PWD/lustre/include/uapi $CPPFLAGS"
+])
-# UAPI headers, libcfs/include for util headers, lustre/include for liblustreapi and friends
-CPPFLAGS="-I$PWD/libcfs/include -I$PWD/lnet/include/uapi -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS"
+# libcfs/include for util headers, lnetconfig headers, lustre/include for liblustreapi and friends
+CPPFLAGS="-I$PWD/libcfs/include -I$PWD/lnet/utils -I$PWD/lustre/include $CPPFLAGS"
CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
AC_SUBST(CCASFLAGS)
CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
AC_SUBST(CCASFLAGS)
#include <linux/lnet/nidstr.h>
#include <linux/lnet/lnetctl.h>
#include <linux/lnet/nidstr.h>
#include <linux/lnet/lnetctl.h>
+#ifdef HAVE_SERVER_SUPPPORT
#include <linux/lustre/lustre_barrier_user.h>
#include <linux/lustre/lustre_barrier_user.h>
#include <linux/lustre/lustre_cfg.h>
#include <linux/lustre/lustre_ioctl.h>
#include <linux/lustre/lustre_ostid.h>
#include <linux/lustre/lustre_cfg.h>
#include <linux/lustre/lustre_ioctl.h>
#include <linux/lustre/lustre_ostid.h>