Snap for 12742097 from 37cd0abcaa71b4c8b8aa258a61df20df56c0bc1c to 25Q1-release
Change-Id: Ie8f0dfe0c3d9172aea1c22a61d8d01d3f7bb6908
diff --git a/libc/async_safe/async_safe_log.cpp b/libc/async_safe/async_safe_log.cpp
index c24b326..07133b7 100644
--- a/libc/async_safe/async_safe_log.cpp
+++ b/libc/async_safe/async_safe_log.cpp
@@ -359,7 +359,7 @@
buffer[1] = 'x';
format_integer(buffer + 2, sizeof(buffer) - 2, value, 'x');
} else if (c == 'm') {
-#if __ANDROID_API__ >= 35 // This library is used in mainline modules.
+#if __ANDROID_API_LEVEL__ >= 35 // This library is used in mainline modules.
if (alternate) {
const char* name = strerrorname_np(errno);
if (name) {
diff --git a/tests/async_safe_test.cpp b/tests/async_safe_test.cpp
index 8692c8a..ffb8651 100644
--- a/tests/async_safe_test.cpp
+++ b/tests/async_safe_test.cpp
@@ -79,13 +79,13 @@
async_safe_format_buffer(buf, sizeof(buf), "a%mZ");
EXPECT_STREQ("aInvalid argumentZ", buf);
-#if __ANDROID_API__ >= 35
+#if __ANDROID_API_LEVEL__ >= 35
errno = EINVAL;
async_safe_format_buffer(buf, sizeof(buf), "a%#mZ");
EXPECT_STREQ("aEINVALZ", buf);
#endif
-#if __ANDROID_API__ >= 35
+#if __ANDROID_API_LEVEL__ >= 35
errno = -1;
async_safe_format_buffer(buf, sizeof(buf), "a%#mZ");
EXPECT_STREQ("a-1Z", buf);