summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-04-01 10:07:13 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2024-04-02 16:20:49 +0200
commit2a24e2485722b0e12e17a2bd473bd15c9e420bdb (patch)
tree16ee10833bd56cd22649735060b9f810510a5526 /tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c
parent965c6167c93f3fac53e25807f83c07e87b3c085a (diff)
downloadlinux-2a24e2485722b0e12e17a2bd473bd15c9e420bdb.tar.gz
linux-2a24e2485722b0e12e17a2bd473bd15c9e420bdb.tar.bz2
linux-2a24e2485722b0e12e17a2bd473bd15c9e420bdb.zip
bpftool: Use __typeof__() instead of typeof() in BPF skeleton
When generated BPF skeleton header is included in C++ code base, some compiler setups will emit warning about using language extensions due to typeof() usage, resulting in something like: error: extension used [-Werror,-Wlanguage-extension-token] obj->struct_ops.empty_tcp_ca = (typeof(obj->struct_ops.empty_tcp_ca)) ^ It looks like __typeof__() is a preferred way to do typeof() with better C++ compatibility behavior, so switch to that. With __typeof__() we get no such warning. Fixes: c2a0257c1edf ("bpftool: Cast pointers for shadow types explicitly.") Fixes: 00389c58ffe9 ("bpftool: Add support for subskeletons") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Kui-Feng Lee <thinker.li@gmail.com> Acked-by: Quentin Monnet <qmo@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20240401170713.2081368-1-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c')
0 files changed, 0 insertions, 0 deletions