]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
libbpf: Remove extern declaration of bpf_stream_vprintk()
authorIhor Solodrai <ihor.solodrai@linux.dev>
Wed, 18 Feb 2026 21:56:51 +0000 (13:56 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 18 Feb 2026 22:58:47 +0000 (14:58 -0800)
An issue was reported that building BPF program which includes both
vmlinux.h and bpf_helpers.h from libbpf fails due to conflicting
declarations of bpf_stream_vprintk().

Remove the extern declaration from bpf_helpers.h to address this.

In order to use bpf_stream_printk() macro, BPF programs are expected
to either include vmlinux.h of the kernel they are targeting, or add
their own extern declaration.

Reported-by: Luca Boccassi <luca.boccassi@gmail.com>
Closes: https://github.com/libbpf/libbpf/issues/947
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260218215651.2057673-3-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf_helpers.h

index c145da05a67cda16da17ec07a49b4ae4bd36bdea..9d160b5b9c0ee42a0cc72a1451c037411958828f 100644 (file)
@@ -315,9 +315,6 @@ enum libbpf_tristate {
                          ___param, sizeof(___param));          \
 })
 
-extern int bpf_stream_vprintk(int stream_id, const char *fmt__str, const void *args,
-                             __u32 len__sz) __weak __ksym;
-
 #define bpf_stream_printk(stream_id, fmt, args...)                                     \
 ({                                                                                     \
        static const char ___fmt[] = fmt;                                               \