aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf_legacy.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-11-03 15:08:34 -0700
committerAlexei Starovoitov <ast@kernel.org>2021-11-07 08:34:22 -0800
commitbe80e9cdbca8ac66d09e0e24e0bd41d992362a0b (patch)
treef921e47f574fb5d37ef23addc687343887eb90e0 /tools/lib/bpf/libbpf_legacy.h
parentlibbpf: Fix non-C89 loop variable declaration in gen_loader.c (diff)
downloadlinux-dev-be80e9cdbca8ac66d09e0e24e0bd41d992362a0b.tar.xz
linux-dev-be80e9cdbca8ac66d09e0e24e0bd41d992362a0b.zip
libbpf: Rename DECLARE_LIBBPF_OPTS into LIBBPF_OPTS
It's confusing that libbpf-provided helper macro doesn't start with LIBBPF. Also "declare" vs "define" is confusing terminology, I can never remember and always have to look up previous examples. Bypass both issues by renaming DECLARE_LIBBPF_OPTS into a short and clean LIBBPF_OPTS. To avoid breaking existing code, provide: #define DECLARE_LIBBPF_OPTS LIBBPF_OPTS in libbpf_legacy.h. We can decide later if we ever want to remove it or we'll keep it forever because it doesn't add any maintainability burden. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Dave Marchevsky <davemarchevsky@fb.com> Link: https://lore.kernel.org/bpf/20211103220845.2676888-2-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/libbpf_legacy.h')
-rw-r--r--tools/lib/bpf/libbpf_legacy.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf_legacy.h b/tools/lib/bpf/libbpf_legacy.h
index 5ba5c9beccfa..bb03c568af7b 100644
--- a/tools/lib/bpf/libbpf_legacy.h
+++ b/tools/lib/bpf/libbpf_legacy.h
@@ -69,6 +69,7 @@ enum libbpf_strict_mode {
LIBBPF_API int libbpf_set_strict_mode(enum libbpf_strict_mode mode);
+#define DECLARE_LIBBPF_OPTS LIBBPF_OPTS
#ifdef __cplusplus
} /* extern "C" */