aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_cpp.cpp
diff options
context:
space:
mode:
authorTony Ambardar <[email protected]>2024-07-29 09:24:17 +0000
committerAndrii Nakryiko <[email protected]>2024-07-30 20:45:44 +0000
commitc0247800ee7da5bc067b2916cf2722f755072307 (patch)
tree1ded00f4789bc6d6ea07cfea2fd9be5860f710b6 /tools/testing/selftests/bpf/test_cpp.cpp
parenttools/bpf: Fix the wrong format specifier (diff)
downloadkernel-c0247800ee7da5bc067b2916cf2722f755072307.tar.gz
kernel-c0247800ee7da5bc067b2916cf2722f755072307.zip
selftests/bpf: Use portable POSIX basename()
Use the POSIX version of basename() to allow compilation against non-gnu libc (e.g. musl). Include <libgen.h> ahead of <string.h> to enable using functions from the latter while preferring POSIX over GNU basename(). In veristat.c, rely on strdupa() to avoid basename() altering the passed "const char" argument. This is not needed in xskxceiver.c since the arg is mutable and the program exits immediately after usage. Signed-off-by: Tony Ambardar <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/0fd3c9f3c605e6cba33504213c9df287817ade04.1722244708.git.tony.ambardar@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_cpp.cpp')
0 files changed, 0 insertions, 0 deletions