]> git.baikalelectronics.ru Git - kernel.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)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Aug 2020 01:09:45 +0000 (18:09 -0700)
commitb9e658eef9eb5ebe6c81d319c96fc5f23d691c32
treea28cae3c9981bd366b20b36ba05b18281952ad73
parent46f000f5d22b5d1fdd16835db8f4264229649b1c
tools/bpftool: Make skeleton code C++17-friendly by dropping typeof()

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: 4425552a0650 ("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
tools/bpf/bpftool/gen.c