mbuf: add C++ include guard for dynamic fields header
authorAshish Sadanandan <ashish.sadanandan@gmail.com>
Thu, 7 Jan 2021 01:31:14 +0000 (18:31 -0700)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 11 Jan 2021 14:34:21 +0000 (15:34 +0100)
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.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf_dyn.h

index d88e7ba..fc4eee7 100644 (file)
  */
 
 #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_ */