Skip to content

Commit

Permalink
kni: add missing C++ guards
Browse files Browse the repository at this point in the history
[ 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: 3fc5ca2 ("kni: initial import")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  • Loading branch information
bdoole1 authored and cpaelzer committed Mar 9, 2022
1 parent 5d5711a commit cf53c73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/librte_eal/linux/eal/include/rte_kni_common.h
Expand Up @@ -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>
Expand Down Expand Up @@ -134,4 +138,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_ */

0 comments on commit cf53c73

Please sign in to comment.