diff --git a/netbpfload/Android.bp b/netbpfload/Android.bp index 9c45bdcadc..cc4f5d03c8 100644 --- a/netbpfload/Android.bp +++ b/netbpfload/Android.bp @@ -30,7 +30,6 @@ cc_binary { header_libs: ["bpf_headers"], shared_libs: [ "libbase", - "libcutils", "liblog", ], srcs: [ diff --git a/netbpfload/loader.cpp b/netbpfload/loader.cpp index 82ce6d5fa1..9aeb184b05 100644 --- a/netbpfload/loader.cpp +++ b/netbpfload/loader.cpp @@ -59,9 +59,9 @@ #include #include +#include #include #include -#include #define BPF_FS_PATH "/sys/fs/bpf/" @@ -79,17 +79,11 @@ using std::optional; using std::string; using std::vector; -static std::string getBuildTypeInternal() { - char value[PROPERTY_VALUE_MAX] = {}; - (void)property_get("ro.build.type", value, "unknown"); // ignore length - return value; -} - namespace android { namespace bpf { const std::string& getBuildType() { - static std::string t = getBuildTypeInternal(); + static std::string t = android::base::GetProperty("ro.build.type", "unknown"); return t; }