[08/11] kni: fix missing C++ guards

Message ID 20220215170817.662136-9-brian.dooley@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series add missing C++ guards |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Brian Dooley Feb. 15, 2022, 5:08 p.m. UTC
  Some public header files were missing 'extern "C"' C++ guards,
and couldnt be used by C++ applications. Add the missing guards.

Fixes: 3fc5ca2f6352 ("kni: initial import")
Cc: stable@dpdk.org

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
 lib/kni/rte_kni_common.h | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Patch

diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
index b547ea5501..8d3ee0fa4f 100644
--- a/lib/kni/rte_kni_common.h
+++ b/lib/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 <linux/if.h>
 #include <asm/barrier.h>
@@ -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_ */