diff options
author | Tony Ambardar <[email protected]> | 2024-07-29 02:24:17 -0700 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2024-07-30 13:45:44 -0700 |
commit | c0247800ee7da5bc067b2916cf2722f755072307 (patch) | |
tree | 1ded00f4789bc6d6ea07cfea2fd9be5860f710b6 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 781f0bbbdade00f91490a3f64212e8cc8d75905c (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 <[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/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions