From be685863a9ea636bf7924f0a8034bb4c21fb1402 Mon Sep 17 00:00:00 2001 From: Shahaf Shuler Date: Thu, 1 Nov 2018 14:46:45 +0200 Subject: [PATCH] net: fix build with pedantic The following error popped when compiling with -pedantic: In file included from drivers/net/mlx5/mlx5_flow_dv.c:28:0: include/rte_gre.h:20:2: error: type of bit-field 'res2' is a GCC extension [-Werror=pedantic] uint16_t res2:4; /**< Reserved */ Fixing by adding the __extension__ attribute. Fixes: 894f71a3805d ("net: add GRE header structure") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler Reviewed-by: Ferruh Yigit --- lib/librte_net/rte_gre.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_net/rte_gre.h b/lib/librte_net/rte_gre.h index 69499bb82a..05aa9d143e 100644 --- a/lib/librte_net/rte_gre.h +++ b/lib/librte_net/rte_gre.h @@ -15,6 +15,7 @@ extern "C" { /** * GRE Header */ +__extension__ struct gre_hdr { #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN uint16_t res2:4; /**< Reserved */ -- 2.20.1