From 56b5db0c34bde673b488834878a455581ccff9e5 Mon Sep 17 00:00:00 2001 From: Himanshu Pandey <24816726+hp77-creator@users.noreply.github.com> Date: Sat, 24 Aug 2024 00:00:37 +0530 Subject: [PATCH] Add check for BUILD_WITH_LIBBPF wherever bpf libraries are used --- runtime/src/bpf_map/userspace/prog_array.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/src/bpf_map/userspace/prog_array.cpp b/runtime/src/bpf_map/userspace/prog_array.cpp index 4bd4fa35..6a9b0538 100644 --- a/runtime/src/bpf_map/userspace/prog_array.cpp +++ b/runtime/src/bpf_map/userspace/prog_array.cpp @@ -4,10 +4,12 @@ * All rights reserved. */ -#if __linux__ -#include -#include +#if __linux__ +#if BPFTIME_BUILD_WITH_LIBBPF +#include "bpf/bpf.h" +#include "linux/bpf.h" #include +#endif #include #elif __APPLE__ #include "bpftime_epoll.h"