aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/SkCpu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkCpu.cpp b/src/core/SkCpu.cpp
index 885c11a3f4..0107789bfb 100644
--- a/src/core/SkCpu.cpp
+++ b/src/core/SkCpu.cpp
@@ -86,8 +86,10 @@
return features;
}
-#elif defined(SK_CPU_ARM32) && __has_include(<sys/auxv.h>)
- // sys/auxv.h won't be present on NDK builds before API v21.
+#elif defined(SK_CPU_ARM32) && __has_include(<sys/auxv.h>) && \
+ (!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
+ // sys/auxv.h will always be present in the Android NDK due to unified
+ //headers, but getauxval is only defined for API >= 18.
#include <sys/auxv.h>
static uint32_t read_cpu_features() {