Skip to content

Commit 0cecd49

Browse files
theihorAlexei Starovoitov
authored andcommitted
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 <luca.boccassi@gmail.com> Closes: libbpf/libbpf#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>
1 parent b3dfa12 commit 0cecd49

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

tools/lib/bpf/bpf_helpers.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,6 @@ enum libbpf_tristate {
315315
___param, sizeof(___param)); \
316316
})
317317

318-
extern int bpf_stream_vprintk(int stream_id, const char *fmt__str, const void *args,
319-
__u32 len__sz) __weak __ksym;
320-
321318
#define bpf_stream_printk(stream_id, fmt, args...) \
322319
({ \
323320
static const char ___fmt[] = fmt; \

0 commit comments

Comments
 (0)