Skip to content

Commit a8d1c48

Browse files
guidosarduccianakryiko
authored andcommitted
selftests/bpf: Fix undefined UINT_MAX in veristat.c
Include <limits.h> in 'veristat.c' to provide a UINT_MAX definition and avoid multiple compile errors against mips64el/musl-libc: veristat.c: In function 'max_verifier_log_size': veristat.c:1135:36: error: 'UINT_MAX' undeclared (first use in this function) 1135 | const int SMALL_LOG_SIZE = UINT_MAX >> 8; | ^~~~~~~~ veristat.c:24:1: note: 'UINT_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'? 23 | #include <math.h> +++ |+#include <limits.h> 24 | Fixes: 1f7c336 ("selftests/bpf: Increase verifier log limit in veristat") Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20250116075036.3459898-1-tony.ambardar@gmail.com
1 parent 87c5441 commit a8d1c48

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/bpf/veristat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <gelf.h>
2222
#include <float.h>
2323
#include <math.h>
24+
#include <limits.h>
2425

2526
#ifndef ARRAY_SIZE
2627
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

0 commit comments

Comments
 (0)