[PATCH 1/1] eal: add C++ include guard in generic/rte_vect.h
Ashish Sadanandan
ashish.sadanandan at gmail.com
Fri Feb 2 06:13:35 CET 2024
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: 86c743cf9140 ("eal: define generic vector types")
Cc: nelio.laranjeiro at 6wind.com
Cc: stable at dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan at gmail.com>
---
.mailmap | 2 +-
lib/eal/include/generic/rte_vect.h | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index aa569ff456..3938ace307 100644
--- a/.mailmap
+++ b/.mailmap
@@ -140,7 +140,7 @@ Ashijeet Acharya <ashijeet.acharya at 6wind.com>
Ashish Gupta <ashishg at marvell.com> <ashish.gupta at marvell.com> <ashish.gupta at caviumnetworks.com>
Ashish Jain <ashish.jain at nxp.com>
Ashish Paul <apaul at juniper.net>
-Ashish Sadanandan <ashish.sadanandan at gmail.com>
+Ashish Sadanandan <ashish.sadanandan at gmail.com> <quic_asadanan at quicinc.com>
Ashish Shah <ashish.n.shah at intel.com>
Ashwin Sekhar T K <asekhar at marvell.com> <ashwin.sekhar at caviumnetworks.com>
Asim Jamshed <asim.jamshed at gmail.com>
diff --git a/lib/eal/include/generic/rte_vect.h b/lib/eal/include/generic/rte_vect.h
index 6540419cd2..3578d8749b 100644
--- a/lib/eal/include/generic/rte_vect.h
+++ b/lib/eal/include/generic/rte_vect.h
@@ -15,6 +15,10 @@
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef RTE_TOOLCHAIN_MSVC
/* Unsigned vector types */
@@ -226,4 +230,8 @@ uint16_t rte_vect_get_max_simd_bitwidth(void);
*/
int rte_vect_set_max_simd_bitwidth(uint16_t bitwidth);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_VECT_H_ */
--
2.31.1
More information about the dev
mailing list