diff options
| author | Tony Ambardar <[email protected]> | 2024-07-23 05:54:36 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-07-29 22:05:07 +0000 |
| commit | 6495eb79ca7d15bd87c38d77307e8f9b6b7bf4ef (patch) | |
| tree | 9a9a1f29edde9b7a1a739d68fc5c0479367c94b8 /tools/testing/selftests/bpf/prog_tests/user_ringbuf.c | |
| parent | selftests/bpf: Fix missing UINT_MAX definitions in benchmarks (diff) | |
| download | kernel-6495eb79ca7d15bd87c38d77307e8f9b6b7bf4ef.tar.gz kernel-6495eb79ca7d15bd87c38d77307e8f9b6b7bf4ef.zip | |
selftests/bpf: Fix missing BUILD_BUG_ON() declaration
Explicitly include '<linux/build_bug.h>' to fix errors seen compiling with
gcc targeting mips64el/musl-libc:
user_ringbuf.c: In function 'test_user_ringbuf_loop':
user_ringbuf.c:426:9: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration]
426 | BUILD_BUG_ON(total_samples <= c_max_entries);
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
Fixes: e5a9df51c746 ("selftests/bpf: Add selftests validating the user ringbuf")
Signed-off-by: Tony Ambardar <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/b28575f9221ec54871c46a2e87612bb4bbf46ccd.1721713597.git.tony.ambardar@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/user_ringbuf.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/user_ringbuf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c b/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c index e51721df14fc..dfff6feac12c 100644 --- a/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c +++ b/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c @@ -4,6 +4,7 @@ #define _GNU_SOURCE #include <linux/compiler.h> #include <linux/ring_buffer.h> +#include <linux/build_bug.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> |
