From: Asim Jamshed Date: Mon, 16 Mar 2020 18:42:36 +0000 (+0000) Subject: fib: fix headers for C++ support X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=44415a62e6c64af014d935f13e099b17b4ad4893;p=dpdk.git fib: fix headers for C++ support This patch allows C++ programs to use librte_fib library routines. Previously C++ programs were not able to link this library and programs would fail to get linked. With this patch compilation and linking will be successful. Fixes: 39e927248416 ("fib: add FIB library") Fixes: 40d41a8a7b34 ("fib: support IPv6") Cc: stable@dpdk.org Signed-off-by: Asim Jamshed Signed-off-by: Saikrishna Edupuganti Reviewed-by: David Marchand Acked-by: Vladimir Medvedkin --- diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h index d06c5ef55a..af3bbf07ee 100644 --- a/lib/librte_fib/rte_fib.h +++ b/lib/librte_fib/rte_fib.h @@ -14,6 +14,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct rte_fib; struct rte_rib; @@ -185,4 +189,8 @@ __rte_experimental struct rte_rib * rte_fib_get_rib(struct rte_fib *fib); +#ifdef __cplusplus +} +#endif + #endif /* _RTE_FIB_H_ */ diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h index 4268704038..66c71c84c9 100644 --- a/lib/librte_fib/rte_fib6.h +++ b/lib/librte_fib/rte_fib6.h @@ -14,6 +14,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #define RTE_FIB6_IPV6_ADDR_SIZE 16 /** Maximum depth value possible for IPv6 FIB. */ #define RTE_FIB6_MAXDEPTH 128 @@ -190,4 +194,8 @@ __rte_experimental struct rte_rib6 * rte_fib6_get_rib(struct rte_fib6 *fib); +#ifdef __cplusplus +} +#endif + #endif /* _RTE_FIB6_H_ */