From 96b9d4162f435004db9157795fc3ed624bb0ea5e Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 16 May 2025 12:36:32 +0200 Subject: [PATCH] bpf-link: Add HAVE_LIBBPF check Fixes compilation error in userns-restrict.c where we try to include libbpf.h when it is not available. --- src/shared/bpf-link.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/bpf-link.h b/src/shared/bpf-link.h index 402327a5a3d..53711e49053 100644 --- a/src/shared/bpf-link.h +++ b/src/shared/bpf-link.h @@ -2,6 +2,8 @@ #pragma once +#if HAVE_LIBBPF + #include #include @@ -17,3 +19,5 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct bpf_link *, bpf_link_free); struct ring_buffer* bpf_ring_buffer_free(struct ring_buffer *rb); DEFINE_TRIVIAL_CLEANUP_FUNC(struct ring_buffer *, bpf_ring_buffer_free); + +#endif -- 2.47.3