On 25/06/2020 21:32, Stephen Hemminger wrote:
All include files should be safe from C++
Fixes: 5a5793a5ffa2 ("rib: add RIB library")
Fixes: f7e861e21c46 ("rib: support IPv6")
Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
lib/librte_rib/rte_rib.h | 8 ++++++++
lib/librte_rib/rte_rib6.h | 10 +++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h
index a7daa9d8a76e..e9ffefce6edd 100644
--- a/lib/librte_rib/rte_rib.h
+++ b/lib/librte_rib/rte_rib.h
@@ -13,6 +13,10 @@
#include <rte_compat.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* rte_rib_get_nxt() flags
*/
@@ -275,4 +279,8 @@ __rte_experimental
void
rte_rib_free(struct rte_rib *rib);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_RIB_H_ */
diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
index e6b4b7fff98c..68eaa8aa4812 100644
--- a/lib/librte_rib/rte_rib6.h
+++ b/lib/librte_rib/rte_rib6.h
@@ -14,6 +14,10 @@
#include <rte_memcpy.h>
#include <rte_compat.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define RTE_RIB6_IPV6_ADDR_SIZE 16
/**
@@ -332,4 +336,8 @@ __rte_experimental
void
rte_rib6_free(struct rte_rib6 *rib);
-#endif /* _RTE_RIB_H_ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_RIB6_H_ */
Acked-by: Vladimir Medvedkin <vladimir.medved...@intel.com>
--
Regards,
Vladimir