From: Daan De Meyer Date: Fri, 16 May 2025 10:36:32 +0000 (+0200) Subject: bpf-link: Add HAVE_LIBBPF check X-Git-Tag: v258-rc1~584 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96b9d4162f435004db9157795fc3ed624bb0ea5e;p=thirdparty%2Fsystemd.git 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. --- 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