rtla: Fix build without libbpf header
Subsystems (2)
Tomas Glozar
maintainerPATCH 1/1 rtla: Fix build without libbpf header
rtla supports building without libbpf. However, BPF actions patchset [1] adds an include of bpf/libbpf.h into timerlat_bpf.h, which breaks build on systems that don't have libbpf headers installed.
This is a leftover from a draft version of the patchset where timerlat_bpf_set_action() (which takes a struct bpf_program * argument) was defined in the header. timerlat_bpf.c already includes bpf/libbpf.h via timerlat.skel.h when libbpf is present.
Remove the redundant include to fix build on systems without libbpf headers.
[1] https://lore.kernel.org/linux-trace-kernel/[email protected]/T/
--- tools/tracing/rtla/src/timerlat_bpf.h | 1 - 1 file changed, 1 deletion(-)
tools/tracing/rtla/src/timerlat_bpf.h +0 -1
@@ -12,7 +12,6 @@ enum summary_field { };#ifndef __bpf__ -#include <bpf/libbpf.h> #ifdef HAVE_BPF_SKEL int timerlat_bpf_init (struct timerlat_params *params);int timerlat_bpf_attach (void );
Signature · 1 line
2.53.0
Quoted 38 lines · Tomas Glozar
rtla supports building without libbpf. However, BPF actions patchset [1] adds an include of
bpf/libbpf.hintotimerlat_bpf.h, which breaks build on systems that don't have libbpf headers installed.This is a leftover from a draft version of the patchset where
timerlat_bpf_set_action()(which takes a structbpf_program* argument) was defined in the header.timerlat_bpf.calready includesbpf/libbpf.hviatimerlat.skel.hwhen libbpf is present.Remove the redundant include to fix build on systems without libbpf headers.
[1] https://lore.kernel.org/linux-trace-kernel/[email protected]/T/
Reported-by Steven Rostedt (Google) <[email protected]>Fixes 8cd0f08ac72e ("rtla/timerlat: Support tail call from BPF program")Signed-off-by Tomas Glozar <[email protected]>--- tools/tracing/rtla/src/timerlat_bpf.h | 1 - 1 file changed, 1 deletion(-)tools/tracing/rtla/src/timerlat_bpf.h +0
-1@@ -12,7 +12,6 @@ enum summary_field { };#ifndef __bpf__ -#include <bpf/libbpf.h> #ifdef HAVE_BPF_SKEL int timerlat_bpf_init (struct timerlat_params *params);int timerlat_bpf_attach (void );Signature · 1 line
2.53.0