From: Wu Libin Date: Wed, 18 Jun 2014 12:13:14 +0000 (+0800) Subject: LU-5224 lnet: build failed with MLNX_OFED-2.2 X-Git-Tag: 2.6.0-RC1~53 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=ddea2d2f982276001562f169a3a3556a64cd58ce;hp=839758496322072a0a2334abdcccf074068ccdf9 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/10749 Tested-by: Maloo Reviewed-by: Dmitry Eremin Tested-by: Jenkins Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index 26524f5..71c1c1e 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -63,12 +63,13 @@ #include #endif -#include -#include - #ifdef HAVE_COMPAT_RDMA #include #endif + +#include +#include + #include #include #include