From: Wu Libin Date: Wed, 25 Jun 2014 08:04:51 +0000 (+0800) Subject: LU-5224 lnet: build failed with MLNX_OFED-2.2 X-Git-Tag: 2.5.3~22 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=669576445d24eeaa8f3ee655d9442fa36698978f;p=fs%2Flustre-release.git LU-5224 lnet: build failed with MLNX_OFED-2.2 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 " in front of "#include " 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 Change-Id: I98df2a5faaecbd44528d3bd8a7ba796cc1d14cdc Reviewed-on: http://review.whamcloud.com/10819 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index f2c1f77..d07fc5f 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -63,6 +63,10 @@ #include #endif +#ifdef HAVE_COMPAT_RDMA +#include +#endif + #include #include @@ -73,9 +77,6 @@ #include #include -#ifdef HAVE_COMPAT_RDMA -#include -#endif #include #include #include