From: Ashish Sadanandan Date: Thu, 7 Jan 2021 01:31:14 +0000 (-0700) Subject: mbuf: add C++ include guard for dynamic fields header X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=397fb6a8d96cf06fc83bd87cadf46d2226fc42ed;p=dpdk.git mbuf: add C++ include guard for dynamic fields header 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 Acked-by: Olivier Matz --- diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h index d88e7bacc5..fc4eee71d0 100644 --- a/lib/librte_mbuf/rte_mbuf_dyn.h +++ b/lib/librte_mbuf/rte_mbuf_dyn.h @@ -67,6 +67,11 @@ */ #include + +#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_ */