bpftool: Fix C++ additions to skeleton
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 16 Feb 2022 23:35:40 +0000 (15:35 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 17 Feb 2022 00:58:51 +0000 (16:58 -0800)
commit9b6eb0478dfad3b0e7af6c73523d96826210f4fe
tree4f7a775147c617a41a4a4fc3c905b3cc37bcf098
parentf76d8507d23834f7e56b0fe95c82605e7d7e0efe
bpftool: Fix C++ additions to skeleton

Mark C++-specific T::open() and other methods as static inline to avoid
symbol redefinition when multiple files use the same skeleton header in
an application.

Fixes: bb8ffe61ea45 ("bpftool: Add C++-specific open/load/etc skeleton wrappers")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220216233540.216642-1-andrii@kernel.org
tools/bpf/bpftool/gen.c