]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: make sure bpf headers are c++ include-able
authorStanislav Fomichev <sdf@google.com>
Wed, 21 Nov 2018 17:29:44 +0000 (09:29 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Nov 2018 22:15:41 +0000 (23:15 +0100)
commit884c7a4847e2d83805e128e195fcb6772a7e2f9f
tree8f81fc53ebbdf9a0c08cd0b6b9b16d5a19d33655
parent5c7a4837976751208325641b183cb01a0fc7dad5
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>
tools/lib/bpf/Makefile
tools/lib/bpf/bpf.h
tools/lib/bpf/btf.h
tools/lib/bpf/libbpf.h
tools/lib/bpf/test_libbpf.cpp [new file with mode: 0644]