From 01c32da313489c2b73612ee4ddea7a516ba9ad19 Mon Sep 17 00:00:00 2001 From: oxmc <67136658+oxmc@users.noreply.github.com> Date: Thu, 4 Jun 2026 05:40:57 -0700 Subject: [PATCH] BootControl: qualify android::base with :: to avoid aidl namespace collision --- hal/boot_control/rpi/BootControl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hal/boot_control/rpi/BootControl.cpp b/hal/boot_control/rpi/BootControl.cpp index 723bcb5..8c5c8ee 100644 --- a/hal/boot_control/rpi/BootControl.cpp +++ b/hal/boot_control/rpi/BootControl.cpp @@ -63,7 +63,7 @@ void BootControl::initDefaultMisc(PawletBootControl* ctrl) { } bool BootControl::readMisc(PawletBootControl* ctrl) { - android::base::unique_fd fd( + ::android::base::unique_fd fd( open(misc_device_.c_str(), O_RDONLY | O_CLOEXEC)); if (fd.get() < 0) { PLOG(ERROR) << "Cannot open misc for reading: " << misc_device_; @@ -104,7 +104,7 @@ bool BootControl::writeMisc(const PawletBootControl& in) { ctrl.crc32 = 0; ctrl.crc32 = computeCrc32(&ctrl, sizeof(ctrl) - sizeof(uint32_t)); - android::base::unique_fd fd( + ::android::base::unique_fd fd( open(misc_device_.c_str(), O_WRONLY | O_CLOEXEC)); if (fd.get() < 0) { PLOG(ERROR) << "Cannot open misc for writing: " << misc_device_; @@ -124,12 +124,12 @@ bool BootControl::writeMisc(const PawletBootControl& in) { bool BootControl::copyBootPartition(const std::string& src, const std::string& dst) { - android::base::unique_fd src_fd(open(src.c_str(), O_RDONLY | O_CLOEXEC)); + ::android::base::unique_fd src_fd(open(src.c_str(), O_RDONLY | O_CLOEXEC)); if (src_fd.get() < 0) { PLOG(ERROR) << "Cannot open source boot partition: " << src; return false; } - android::base::unique_fd dst_fd(open(dst.c_str(), O_WRONLY | O_CLOEXEC)); + ::android::base::unique_fd dst_fd(open(dst.c_str(), O_WRONLY | O_CLOEXEC)); if (dst_fd.get() < 0) { PLOG(ERROR) << "Cannot open dest boot partition: " << dst; return false; @@ -178,7 +178,7 @@ ndk::ScopedAStatus BootControl::getCurrentSlot(int32_t* out) { // The RPi firmware writes the booted slot into the kernel cmdline via // androidboot.slot_suffix, which init propagates to ro.boot.slot_suffix. const std::string suffix = - android::base::GetProperty("ro.boot.slot_suffix", ""); + ::android::base::GetProperty("ro.boot.slot_suffix", ""); if (suffix == "_b") { *out = 1; } else {