From: Thomas Monjalon Date: Tue, 3 Mar 2015 14:29:25 +0000 (+0100) Subject: mlx4: fix build with mempool debug enabled X-Git-Tag: spdx-start~9504 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9d740b97f246e748f009daf9b5218cdd7555eb1f;p=dpdk.git mlx4: fix build with mempool debug enabled The mempool header forces error on -Wcast-qual and makes verbs.h failing. Let's include verbs before as a system header. Fixes: 7fae69eeff13 ("mlx4: new poll mode driver") Signed-off-by: Thomas Monjalon Acked-by: Adrien Mazarguil --- diff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c index 492cbbf8e6..b5774c4801 100644 --- a/lib/librte_pmd_mlx4/mlx4.c +++ b/lib/librte_pmd_mlx4/mlx4.c @@ -60,6 +60,16 @@ #include #include +/* Verbs header. */ +/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ +#ifdef PEDANTIC +#pragma GCC diagnostic ignored "-pedantic" +#endif +#include +#ifdef PEDANTIC +#pragma GCC diagnostic error "-pedantic" +#endif + /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-pedantic" @@ -81,18 +91,6 @@ #pragma GCC diagnostic error "-pedantic" #endif -/* Verbs header. */ -/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ -#ifdef PEDANTIC -#pragma GCC diagnostic ignored "-pedantic" -#endif - -#include - -#ifdef PEDANTIC -#pragma GCC diagnostic error "-pedantic" -#endif - /* Generated configuration header. */ #include "mlx4_autoconf.h"