From 227ac5645450bca279735a2a0dbba77c24f5fbb4 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 12 Mar 2020 09:37:05 -0700 Subject: [PATCH] liblog: fix header guards ordering __ANDROID_API__ isn't defined on host, so this check will fail due to -Wundef. The || is short circuited through, so we can check for host first and only have the right side of the || evaluated for device builds. Bug: 150898477 Bug: 151255209 Test: build Change-Id: I2e0bc055ac0c7ba8262875801cdaed9cc30d2cef --- liblog/include/android/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblog/include/android/log.h b/liblog/include/android/log.h index 15c796356..bb5c092c7 100644 --- a/liblog/include/android/log.h +++ b/liblog/include/android/log.h @@ -206,7 +206,7 @@ typedef void (*__android_logger_function)(const struct __android_logger_data* lo */ typedef void (*__android_aborter_function)(const char* abort_message); -#if __ANDROID_API__ >= 30 || !defined(__ANDROID__) +#if !defined(__ANDROID__) || __ANDROID_API__ >= 30 /** * Writes the log message specified with logger_data and msg to the log. logger_data includes * additional file name and line number information that a logger may use. logger_data is versioned