From cc7760ce9a4acacd6be3f7025c393cf6a84e6eb8 Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Wed, 18 Feb 2026 13:56:51 -0800 Subject: [PATCH] libbpf: Remove extern declaration of bpf_stream_vprintk() 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 Closes: https://github.com/libbpf/libbpf/issues/947 Signed-off-by: Ihor Solodrai Link: https://lore.kernel.org/r/20260218215651.2057673-3-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov --- src/bpf_helpers.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/bpf_helpers.h b/src/bpf_helpers.h index c145da0..9d160b5 100644 --- a/src/bpf_helpers.h +++ b/src/bpf_helpers.h @@ -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; \