From 581dea537e997e3afdcd4273fb9f5566055d1c4d Mon Sep 17 00:00:00 2001 From: Brian Dooley Date: Wed, 16 Feb 2022 15:14:53 +0000 Subject: [PATCH] kni: add missing C++ guards [ upstream commit e90df35c7a0328f7ad5bfc4d2d9968ff774d7f77 ] Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards. Fixes: 3fc5ca2f6352 ("kni: initial import") Signed-off-by: Brian Dooley Acked-by: Bruce Richardson Acked-by: Tyler Retzlaff --- lib/librte_kni/rte_kni_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_kni/rte_kni_common.h b/lib/librte_kni/rte_kni_common.h index b547ea5501..8d3ee0fa4f 100644 --- a/lib/librte_kni/rte_kni_common.h +++ b/lib/librte_kni/rte_kni_common.h @@ -6,6 +6,10 @@ #ifndef _RTE_KNI_COMMON_H_ #define _RTE_KNI_COMMON_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef __KERNEL__ #include #include @@ -136,4 +140,8 @@ struct rte_kni_device_info { #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info) #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info) +#ifdef __cplusplus +} +#endif + #endif /* _RTE_KNI_COMMON_H_ */