From 90474a8b72511b03397711d1df89f5044b58c3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 29 Jul 2025 23:03:28 -0700 Subject: [PATCH] bpf: make it a compile-time error if BPFLOADER_MIN_VER isn't defined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of a weird error message about the variable being undeclared, give a clear error message in the case of BPFLOADER_MIN_VER not being defined. Test: TreeHugger Flag: EXEMPT mainline/noop Signed-off-by: Maciej Żenczykowski Change-Id: Ibad18b356c6b3171336834ea478c9c4c7d2540c1 --- bpf/progs/include/bpf_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpf/progs/include/bpf_helpers.h b/bpf/progs/include/bpf_helpers.h index 063ff942e2..3ed20b4ffb 100644 --- a/bpf/progs/include/bpf_helpers.h +++ b/bpf/progs/include/bpf_helpers.h @@ -41,7 +41,7 @@ * to change which bpfloaders will process the resulting .o file. */ #ifndef BPFLOADER_MIN_VER -#define BPFLOADER_MIN_VER NEED_TO_DEFINE_BPFLOADER_MIN_VER // inclusive, ie. >= +#error "You must define BPFLOADER_MIN_VER" // inclusive, ie. >= #endif #ifndef BPFLOADER_MAX_VER