fib: add "C" extern linkage for C++ programs
PATCH 1/1 fib: add "C" extern linkage for C++ programs
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.
--- lib/librte_fib/rte_fib.h | 8 ++++++++ lib/librte_fib/rte_fib6.h | 8 ++++++++ 2 files changed, 16 insertions(+)
lib/librte_fib/rte_fib.h +8 -0
@@ -14,6 +14,10 @@#include <rte_compat.h> +#ifdef __cplusplus +extern "C" { +#endif +struct rte_fib ;struct rte_rib ;
@@ -185,4 +189,8 @@ __rte_experimentalstruct rte_rib *rte_fib_get_rib (struct rte_fib *fib); +#ifdef __cplusplus +} +#endif +#endif /* _RTE_FIB_H_ */
lib/librte_fib/rte_fib6.h +8 -0
@@ -14,6 +14,10 @@#include <rte_compat.h> +#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_experimentalstruct rte_rib6 *rte_fib6_get_rib (struct rte_fib6 *fib); +#ifdef __cplusplus +} +#endif +#endif /* _RTE_FIB6_H_ */
Signature · 1 line
2.17.1
Quoted 62 lines · Muhammad Asim Jamshed
This patch allows C++ programs to use
librte_fiblibrary 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.Signed-off-by Muhammad Asim Jamshed <[email protected]>Signed-off-by Saikrishna Edupuganti <[email protected]>--- lib/librte_fib/rte_fib.h | 8 ++++++++ lib/librte_fib/rte_fib6.h | 8 ++++++++ 2 files changed, 16 insertions(+)lib/librte_fib/rte_fib.h +8
-0@@ -14,6 +14,10 @@#include <rte_compat.h> +#ifdef __cplusplus +extern "C" { +#endif +struct rte_fib ;struct rte_rib ;@@ -185,4 +189,8 @@ __rte_experimentalstruct rte_rib *rte_fib_get_rib (struct rte_fib *fib); +#ifdef __cplusplus +} +#endif +#endif /* _RTE_FIB_H_ */ lib/librte_fib/rte_fib6.h +8
-1@@ -14,6 +14,10 @@#include <rte_compat.h> +#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_experimentalstruct rte_rib6 *rte_fib6_get_rib (struct rte_fib6 *fib); +#ifdef __cplusplus +} +#endif +#endif /* _RTE_FIB6_H_ */ --
Quoted 2 lines
2.17.1
Signature · 1 line
David Marchand
Quoted 7 lines · David Marchand
Quoted 5 lines · Muhammad Asim Jamshed
This patch allows C++ programs to use
librte_fiblibrary 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.
Quoted 4 lines
Quoted 3 lines
Signed-off-by Muhammad Asim Jamshed <[email protected]>Signed-off-by Saikrishna Edupuganti <[email protected]>Reviewed-by David Marchand <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand
Quoted 52 lines · Muhammad Asim Jamshed
This patch allows C++ programs to use
librte_fiblibrary 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.Signed-off-by Muhammad Asim Jamshed <[email protected]>Signed-off-by Saikrishna Edupuganti <[email protected]>--- lib/librte_fib/rte_fib.h | 8 ++++++++ lib/librte_fib/rte_fib6.h | 8 ++++++++ 2 files changed, 16 insertions(+)lib/librte_fib/rte_fib.h +8
-0@@ -14,6 +14,10 @@#include <rte_compat.h> +#ifdef __cplusplus +extern "C" { +#endif +struct rte_fib ;struct rte_rib ;@@ -185,4 +189,8 @@ __rte_experimentalstruct rte_rib *rte_fib_get_rib (struct rte_fib *fib); +#ifdef __cplusplus +} +#endif +#endif /* _RTE_FIB_H_ */ lib/librte_fib/rte_fib6.h +4
-0@@ -14,6 +14,10 @@#include <rte_compat.h> +#ifdef __cplusplus +extern "C" { +#endif +#define RTE_FIB6_IPV6_ADDR_SIZE 16/** Maximum depth value possible for IPv6 FIB. */ #define RTE_FIB6_MAXDEPTH 128
lib/librte_fib/rte_fib6.h __rte_experimental · line 201
Quoted 8 lines
lib/librte_fib/rte_fib6.h +4
-0@@ -190,4 +194,8 @@ __rte_experimentalstruct rte_rib6 *rte_fib6_get_rib (struct rte_fib6 *fib); +#ifdef __cplusplus +} +#endif +#endif /* _RTE_FIB6_H_ */
Signature · 2 lines
Regards, Vladimir