summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_cpp.cpp
diff options
context:
space:
mode:
authorTony Ambardar <tony.ambardar@gmail.com>2024-07-29 02:24:17 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-07-30 13:45:44 -0700
commitc0247800ee7da5bc067b2916cf2722f755072307 (patch)
tree1ded00f4789bc6d6ea07cfea2fd9be5860f710b6 /tools/testing/selftests/bpf/test_cpp.cpp
parent781f0bbbdade00f91490a3f64212e8cc8d75905c (diff)
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 <tony.ambardar@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> 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