[PATCH v2 02/11] telemetry: fix missing C++ guards
Brian Dooley
brian.dooley at intel.com
Wed Feb 16 16:14:47 CET 2022
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: 8877ac688b52 ("telemetry: introduce infrastructure")
Cc: ciara.power at intel.com
Cc: stable at dpdk.org
Signed-off-by: Brian Dooley <brian.dooley at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
v2: Added missing apostrophe to commit message.
---
lib/telemetry/rte_telemetry.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index 7bca8a9a49..3372b32f38 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -9,6 +9,10 @@
#ifndef _RTE_TELEMETRY_H_
#define _RTE_TELEMETRY_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Maximum length for string used in object. */
#define RTE_TEL_MAX_STRING_LEN 128
/** Maximum length of string. */
@@ -294,4 +298,8 @@ rte_tel_data_alloc(void);
void
rte_tel_data_free(struct rte_tel_data *data);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.25.1
More information about the dev
mailing list