Skip to content

Commit

Permalink
Add check for BUILD_WITH_LIBBPF wherever bpf libraries are used
Browse files Browse the repository at this point in the history
  • Loading branch information
hp77-creator committed Aug 23, 2024
1 parent 3bfd290 commit 56b5db0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions runtime/src/bpf_map/userspace/prog_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
* All rights reserved.
*/

#if __linux__
#include <bpf/bpf.h>
#include <linux/bpf.h>
#if __linux__
#if BPFTIME_BUILD_WITH_LIBBPF
#include "bpf/bpf.h"
#include "linux/bpf.h"
#include <bpf/libbpf.h>
#endif
#include <gnu/lib-names.h>
#elif __APPLE__
#include "bpftime_epoll.h"
Expand Down

0 comments on commit 56b5db0

Please sign in to comment.