Skip to content

Commit 56b5db0

Browse files
committed
Add check for BUILD_WITH_LIBBPF wherever bpf libraries are used
1 parent 3bfd290 commit 56b5db0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

runtime/src/bpf_map/userspace/prog_array.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
* All rights reserved.
55
*/
66

7-
#if __linux__
8-
#include <bpf/bpf.h>
9-
#include <linux/bpf.h>
7+
#if __linux__
8+
#if BPFTIME_BUILD_WITH_LIBBPF
9+
#include "bpf/bpf.h"
10+
#include "linux/bpf.h"
1011
#include <bpf/libbpf.h>
12+
#endif
1113
#include <gnu/lib-names.h>
1214
#elif __APPLE__
1315
#include "bpftime_epoll.h"

0 commit comments

Comments
 (0)