Skip to contentSkip to conversation

build: Add C++ linkage support to rte_service_component.h file

PATCH Superseded [email protected] 1 participant 1 message Jul 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 build: Add C++ linkage support to rte_service_component.h file

From: Levend Sayar <[email protected]>

"extern C" define is added to rte_service_component.h file to be able to use in C++ context.

---
 lib/librte_eal/include/rte_service_component.h | 9 +++++++++
 1 file changed, 9 insertions(+)
lib/librte_eal/include/rte_service_component.h +9 -0
index b75aba11b..9e66ee7e2 100644
@@ -9,6 +9,11 @@
  * Include this file if you are writing a component that requires CPU cycles to
  * operate, and you wish to run the component using service cores
  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <rte_compat.h>
 #include <rte_service.h>
 
@@ -130,4 +135,8 @@ int32_t rte_service_init(void);
  */
 void rte_service_finalize(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _SERVICE_PRIVATE_H_ */
Signature · 1 line
2.27.0