diff options
| author | Tony Ambardar <[email protected]> | 2024-07-23 05:54:34 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-07-29 22:05:07 +0000 |
| commit | d44c93fc2f5a0c47b23fa03d374e45259abd92d2 (patch) | |
| tree | 136c3f135f702990cd70d53c7b3877279efb3b7e | |
| parent | selftests/bpf: Drop unneeded error.h includes (diff) | |
| download | kernel-d44c93fc2f5a0c47b23fa03d374e45259abd92d2.tar.gz kernel-d44c93fc2f5a0c47b23fa03d374e45259abd92d2.zip | |
selftests/bpf: Fix missing ARRAY_SIZE() definition in bench.c
Add a "bpf_util.h" include to avoid the following error seen compiling for
mips64el with musl libc:
bench.c: In function 'find_benchmark':
bench.c:590:25: error: implicit declaration of function 'ARRAY_SIZE' [-Werror=implicit-function-declaration]
590 | for (i = 0; i < ARRAY_SIZE(benchs); i++) {
| ^~~~~~~~~~
cc1: all warnings being treated as errors
Fixes: 8e7c2a023ac0 ("selftests/bpf: Add benchmark runner infrastructure")
Signed-off-by: Tony Ambardar <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/bc4dde77dfcd17a825d8f28f72f3292341966810.1721713597.git.tony.ambardar@gmail.com
| -rw-r--r-- | tools/testing/selftests/bpf/bench.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c index 627b74ae041b..90dc3aca32bd 100644 --- a/tools/testing/selftests/bpf/bench.c +++ b/tools/testing/selftests/bpf/bench.c @@ -10,6 +10,7 @@ #include <sys/sysinfo.h> #include <signal.h> #include "bench.h" +#include "bpf_util.h" #include "testing_helpers.h" struct env env = { |
