From 400702b6bbbc3e7ec0949d6ab21fcf3a10e1989e Mon Sep 17 00:00:00 2001 From: Hungming Chen Date: Wed, 13 Jan 2021 13:47:48 +0800 Subject: [PATCH] Use header module bpf_syscall_wrappers Use the versioned header library instead of just including the header files. Test: atest BpfMapTest Change-Id: Icf23dcdc051a4ead6a7c6e925159cdc27f49eac2 --- Tethering/Android.bp | 5 +---- Tethering/jni/com_android_networkstack_tethering_BpfMap.cpp | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Tethering/Android.bp b/Tethering/Android.bp index 5edcfe38bd..761e098586 100644 --- a/Tethering/Android.bp +++ b/Tethering/Android.bp @@ -60,10 +60,7 @@ cc_library { "com.android.tethering", ], min_sdk_version: "30", - include_dirs: [ - // TODO: use the libbpf_android_headers instead of just including the header files. - "system/bpf/libbpf_android/include/", - ], + header_libs: ["bpf_syscall_wrappers"], srcs: [ "jni/*.cpp", ], diff --git a/Tethering/jni/com_android_networkstack_tethering_BpfMap.cpp b/Tethering/jni/com_android_networkstack_tethering_BpfMap.cpp index 64f7dcfa3c..eadc210e31 100644 --- a/Tethering/jni/com_android_networkstack_tethering_BpfMap.cpp +++ b/Tethering/jni/com_android_networkstack_tethering_BpfMap.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include #include @@ -24,7 +23,7 @@ #include "nativehelper/scoped_utf_chars.h" #define BPF_FD_JUST_USE_INT -#include "bpf/BpfUtils.h" +#include "BpfSyscallWrappers.h" namespace android {