On Mon, Oct 20, 2025 at 7:09 PM Jesper Juhl jesperjuhl76@gmail.com wrote:
From d2e411b4cd37b1936a30d130e2b21e37e62e0cfb Mon Sep 17 00:00:00 2001 From: Jesper Juhl jesperjuhl76@gmail.com Date: Tue, 21 Oct 2025 03:51:21 +0200 Subject: [PATCH] [PATCH] Fix up 'make versioncheck' issues
'make versioncheck' currently flags a few files that don't need to needs it but doesn't include it. This patch fixes that up.
Signed-Off-By: Jesper Juhl jesperjuhl76@gmail.com
samples/bpf/spintest.bpf.c | 1 - tools/lib/bpf/bpf_helpers.h | 2 ++ tools/testing/selftests/bpf/progs/dev_cgroup.c | 1 - tools/testing/selftests/bpf/progs/netcnt_prog.c | 2 -- tools/testing/selftests/bpf/progs/test_map_lock.c | 1 - tools/testing/selftests/bpf/progs/test_send_signal_kern.c | 1 - tools/testing/selftests/bpf/progs/test_spin_lock.c | 1 - tools/testing/selftests/bpf/progs/test_tcp_estats.c | 1 - tools/testing/selftests/wireguard/qemu/init.c | 1 - 9 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/samples/bpf/spintest.bpf.c b/samples/bpf/spintest.bpf.c index cba5a9d507831..6278f6d0b731f 100644 --- a/samples/bpf/spintest.bpf.c +++ b/samples/bpf/spintest.bpf.c @@ -5,7 +5,6 @@
- License as published by the Free Software Foundation.
*/ #include "vmlinux.h" -#include <linux/version.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_tracing.h>
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h index 80c0285406561..393ce1063a977 100644 --- a/tools/lib/bpf/bpf_helpers.h +++ b/tools/lib/bpf/bpf_helpers.h @@ -2,6 +2,8 @@ #ifndef __BPF_HELPERS__ #define __BPF_HELPERS__
+#include <linux/version.h>
this is libbpf's public API header, we are not adding linux/version.h here. Linux version on which something was built has nothing to do with the version of Linux on which the BPF program is actually running. And BPF programs are most of the time intentionally Linux version-agnostic.
[...]