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.
This commit is contained in:
committed by
Yu Watanabe
parent
b2ef1818e6
commit
96b9d4162f
@@ -2,6 +2,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if HAVE_LIBBPF
|
||||
|
||||
#include <stdio.h>
|
||||
#include <bpf/libbpf.h>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user