Skip to content

Commit

Permalink
bpf: add missing C++ guards
Browse files Browse the repository at this point in the history
[ upstream commit 5a6632d ]

Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.

Fixes: 7a33572 ("lib: remove C++ include guard from private headers")

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 kevintraynor committed Feb 24, 2022
1 parent 362921a commit c02f5bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/bpf/bpf_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef _RTE_BPF_DEF_H_
#define _RTE_BPF_DEF_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
* @file
*
Expand Down Expand Up @@ -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_ */

0 comments on commit c02f5bc

Please sign in to comment.