Whamcloud - gitweb
LU-5224 lnet: build failed with MLNX_OFED-2.2 49/10749/4
authorWu Libin <lwu@ddn.com>
Wed, 18 Jun 2014 12:13:14 +0000 (20:13 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 23 Jun 2014 14:17:56 +0000 (14:17 +0000)
Build lustre client can fail on the SLES11 SP3 with
MLNX_OFED-2.2 against the kernel-3.0.76-0.11, which will
cause the "'pm_qos_req' has incomplete type" error.This patch
put "#include <linux/compat-2.6.h>" in front of
"#include <net/sock.h>" to solve this problem.

This error come with the configure option
"--with-o2ib=/usr/src/ofa_kernel/default/", it affect the
search path of the compiler, which will search the header
files in this directory before the kernel header files
directory.

This patch change this way because "net/sock.h"(exactly is
"linux/netdevice.h") include header file "linux/pm_qos_params.h",
the pm_qos_params.h is exist both in ofa_kernel include
directory and kernel include directory, so we need to put the
linux/compat-2.6.h in front of net/sock.h to solve the
compatible problem.

Signed-off-by: Wu Libin <lwu@ddn.com>
Change-Id: I98df2a5faaecbd44528d3bd8a7ba796cc1d14cdc
Reviewed-on: http://review.whamcloud.com/10749
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/o2iblnd/o2iblnd.h

index 26524f5..71c1c1e 100644 (file)
 #include <linux/pci-dma.h>
 #endif
 
-#include <net/sock.h>
-#include <linux/in.h>
-
 #ifdef HAVE_COMPAT_RDMA
 #include <linux/compat-2.6.h>
 #endif
+
+#include <net/sock.h>
+#include <linux/in.h>
+
 #include <rdma/rdma_cm.h>
 #include <rdma/ib_cm.h>
 #include <rdma/ib_verbs.h>