From e4f9eab7d948b952cc65e9e360576de3ff1f7a9e Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Tue, 21 Jul 2020 11:31:55 +0300 Subject: [PATCH] net: fix pedantic build when trying to compile rte_mpls with pedantic enabled, on old compilers like 4.8 it will complain about bit field definition. error: type of bit-field 'bs' is a GCC extension [-Werror=pedantic] error: type of bit-field 'tc' is a GCC extension [-Werror=pedantic] error: type of bit-field 'tag_lsb' is a GCC extension [-Werror=pedantic] This fixes the compilation error by adding extension to the header definition. Fixes: e480cf487a0d ("net: add MPLS header structure") Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh Reviewed-by: Ferruh Yigit --- lib/librte_net/rte_mpls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h index db91707e67..3e8cb90ec3 100644 --- a/lib/librte_net/rte_mpls.h +++ b/lib/librte_net/rte_mpls.h @@ -21,6 +21,7 @@ extern "C" { /** * MPLS header. */ +__extension__ struct rte_mpls_hdr { uint16_t tag_msb; /**< Label(msb). */ #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN -- 2.20.1