[dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
Ashish Sadanandan
ashish.sadanandan at gmail.com
Tue Dec 29 20:41:44 CET 2020
The header was missing the extern "C" directive which causes name
mangling of functions by C++ compilers, leading to linker errors
complaining of undefined references to these functions.
Signed-off-by: Ashish Sadanandan <ashish.sadanandan at gmail.com>
---
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index d88e7ba..fc4eee7 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -67,6 +67,11 @@
*/
#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Maximum length of the dynamic field or flag string.
*/
@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);
__rte_experimental
int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag);
+#ifdef __cplusplus
+}
#endif
+
+#endif /* _RTE_MBUF_DYN_H_ */
--
2.9.3
More information about the dev
mailing list