Skip to content

Commit cd7312a

Browse files
eddyz87Alexei Starovoitov
authored andcommitted
selftests/bpf: include limits.h needed for PATH_MAX directly
Constant PATH_MAX is used in function unpriv_helpers.c:open_config(). This constant is provided by include file <limits.h>. The dependency was added by commit [1], which does not include <limits.h> directly, relying instead on <limits.h> being included from zlib.h -> zconf.h. As it turns out, this is not the case for all systems, e.g. on Fedora 41 zlib 1.3.1 is used, and there <limits.h> is not included from zconf.h. Hence, there is a compilation error on Fedora 41. [1] commit fc2915b ("selftests/bpf: More precise cpu_mitigations state detection") Fixes: fc2915b ("selftests/bpf: More precise cpu_mitigations state detection") Signed-off-by: Eduard Zingerman <[email protected]> Acked-by: Viktor Malik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent bd07bd1 commit cd7312a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/bpf/unpriv_helpers.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22

33
#include <errno.h>
4+
#include <limits.h>
45
#include <stdbool.h>
56
#include <stdlib.h>
67
#include <stdio.h>

0 commit comments

Comments
 (0)