From 3f061f98130b4fa158207055b710ab63b13370f2 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Sat, 4 Feb 2023 04:06:06 +0000 Subject: [PATCH] fastboot: Fix missing endian header in fastboot_driver.h to avoid header confusion So fastboot_driver.h includes , but that file has a dependency on . So if fastboot_driver.h gets included somewhere before , it results in *very* opaque error message: system/core/fastboot/fastboot.cpp:1490:9: error: expected unqualified-id LOG(VERBOSE) << "Cannot optimize flashing super on non-AB device"; ^ system/libbase/include/android-base/logging.h:221:23: note: expanded from macro 'LOG' ^ system/libbase/include/android-base/logging.h:227:4: note: expanded from macro 'LOGGING_PREAMBLE' (WOULD_LOG(severity) && \ ^ system/libbase/include/android-base/logging.h:202:40: note: expanded from macro 'WOULD_LOG' (UNLIKELY(::android::base::ShouldLog(SEVERITY_LAMBDA(severity), _LOG_TAG_INTERNAL)) || \ ^ system/libbase/include/android-base/logging.h:174:26: note: expanded from macro 'SEVERITY_LAMBDA' using ::android::base::ERROR; \ ^ prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/include/wingdi.h:75:15: note: expanded from macro 'ERROR' ^ This patch includes before to avoid this issue. Reported-by: Daniel Zheng Signed-off-by: John Stultz Change-Id: I8752f2cdbef5b13901f0f4e8adfe60a21db785b6 --- fastboot/fastboot_driver.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fastboot/fastboot_driver.h b/fastboot/fastboot_driver.h index bccd6685f..b422c9179 100644 --- a/fastboot/fastboot_driver.h +++ b/fastboot/fastboot_driver.h @@ -32,6 +32,7 @@ #include #include +#include #include #include #include