libbpf: make sure bpf headers are c++ include-able
Wrap headers in extern "C", to turn off C++ mangling. This simplifies including libbpf in c++ and linking against it. v2 changes: * do the same for btf.h v3 changes: * test_libbpf.cpp to test for possible future c++ breakages Signed-off-by:Stanislav Fomichev <sdf@google.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- tools/lib/bpf/Makefile 12 additions, 3 deletionstools/lib/bpf/Makefile
- tools/lib/bpf/bpf.h 9 additions, 0 deletionstools/lib/bpf/bpf.h
- tools/lib/bpf/btf.h 8 additions, 0 deletionstools/lib/bpf/btf.h
- tools/lib/bpf/libbpf.h 9 additions, 0 deletionstools/lib/bpf/libbpf.h
- tools/lib/bpf/test_libbpf.cpp 18 additions, 0 deletionstools/lib/bpf/test_libbpf.cpp
tools/lib/bpf/test_libbpf.cpp
0 → 100644
Please register or sign in to comment