]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tools/bpftool: Make skeleton code C++17-friendly by dropping typeof()
authorAndrii Nakryiko <andriin@fb.com>
Wed, 12 Aug 2020 02:59:07 +0000 (19:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:42:15 +0000 (11:42 +0200)
commit8d0940cf4ba67bb1e3b40d7bca09bc61edf1450c
treecf852f4c9ad0b2c5846f50d069eadc0f438a05e6
parenta906957b16e95715043fd101ada7bf818906abb0
tools/bpftool: Make skeleton code C++17-friendly by dropping typeof()

[ Upstream commit 8faf7fc597d59b142af41ddd4a2d59485f75f88a ]

Seems like C++17 standard mode doesn't recognize typeof() anymore. This can
be tested by compiling test_cpp test with -std=c++17 or -std=c++1z options.
The use of typeof in skeleton generated code is unnecessary, all types are
well-known at the time of code generation, so remove all typeof()'s to make
skeleton code more future-proof when interacting with C++ compilers.

Fixes: 985ead416df3 ("bpftool: Add skeleton codegen command")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200812025907.1371956-1-andriin@fb.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/bpf/bpftool/gen.c