diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp index 274afacb8b..319e7a6598 100644 --- a/bpf/loader/NetBpfLoad.cpp +++ b/bpf/loader/NetBpfLoad.cpp @@ -68,6 +68,7 @@ #define BPFLOADER_MAINLINE_S_VERSION 42u #define BPFLOADER_MAINLINE_25Q2_VERSION 47u +using android::base::borrowed_fd; using android::base::EndsWith; using android::base::GetIntProperty; using android::base::GetProperty; @@ -870,7 +871,7 @@ static bool isBtfSupported(enum bpf_map_type type) { return type != BPF_MAP_TYPE_DEVMAP_HASH && type != BPF_MAP_TYPE_RINGBUF; } -static int pinMap(const unique_fd& fd, const string& mapName, const struct bpf_map_def& mapDef, +static int pinMap(const borrowed_fd& fd, const string& mapName, const struct bpf_map_def& mapDef, const string& objName, const string& mapPinLoc) { int ret; domain selinux_context = getDomainFromSelinuxContext(mapDef.selinux_context); @@ -1187,7 +1188,7 @@ static void applyMapRelo(ifstream& elfFile, vector &mapFds, vector