]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Do not use btf_dump__new() macro in C++ mode
authorJiri Olsa <jolsa@redhat.com>
Thu, 23 Dec 2021 13:17:35 +0000 (14:17 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 23 Dec 2021 18:23:16 +0000 (10:23 -0800)
commitdba816337f53de1b45ecc1eac504bc02657d6ff1
treea6db96b77000694a2e8543471656a06741cd4eb8
parenta977b0f1c7a59b60543f22c3bffb7074edad5c7d
libbpf: Do not use btf_dump__new() macro in C++ mode

As reported in here [0], C++ compilers don't support
__builtin_types_compatible_p(), so at least don't screw up compilation
for them and let C++ users pick btf_dump__new vs
btf_dump__new_deprecated explicitly.

  [0] https://github.com/libbpf/libbpf/issues/283#issuecomment-986100727

Fixes: 92250676de36 ("libbpf: Ensure btf_dump__new() and btf_dump_opts are future-proof")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20211223131736.483956-1-jolsa@kernel.org
tools/lib/bpf/btf.h