From: Andrii Nakryiko Date: Fri, 31 Mar 2023 22:24:04 +0000 (-0700) Subject: veristat: avoid using kernel-internal headers X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e3b65c0c1a5b8ed06818b7eeb0c44165ea817d52;p=linux.git veristat: avoid using kernel-internal headers Drop linux/compiler.h include, which seems to be needed for ARRAY_SIZE macro only. Redefine own version of ARRAY_SIZE instead. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230331222405.3468634-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov --- diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftests/bpf/veristat.c index daac72b765082..e592d05bccb2d 100644 --- a/tools/testing/selftests/bpf/veristat.c +++ b/tools/testing/selftests/bpf/veristat.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -20,6 +19,10 @@ #include #include +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +#endif + enum stat_id { VERDICT, DURATION,