[v2,10/11] bpf: fix missing C++ guards

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

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Brian Dooley Feb. 16, 2022, 3:14 p.m. UTC
  Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.

Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers")
Cc: thomas@monjalon.net
Cc: stable@dpdk.org

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

---
v2: Added missing apostrophe to commit message.
---
 lib/bpf/bpf_def.h | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Patch

diff --git a/lib/bpf/bpf_def.h b/lib/bpf/bpf_def.h
index fa9125307e..f08cd9106b 100644
--- a/lib/bpf/bpf_def.h
+++ b/lib/bpf/bpf_def.h
@@ -7,6 +7,10 @@ 
 #ifndef _RTE_BPF_DEF_H_
 #define _RTE_BPF_DEF_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @file
  *
@@ -140,4 +144,8 @@  struct ebpf_insn {
  */
 #define	EBPF_FUNC_MAX_ARGS	(EBPF_REG_6 - EBPF_REG_1)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* RTE_BPF_DEF_H_ */