diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c index 9462875ad..a3ea355e3 100644 --- a/src/cpuinfo/SDL_cpuinfo.c +++ b/src/cpuinfo/SDL_cpuinfo.c @@ -50,11 +50,11 @@ #include #endif -#if defined(__ANDROID__) +#if defined(__ANDROID__) && defined(__ARM_ARCH) #include #endif -#if defined(__LINUX__) && HAVE_GETAUXVAL +#if defined(__LINUX__) && defined(__ARM_ARCH) && HAVE_GETAUXVAL #include #include #endif @@ -312,12 +312,12 @@ CPU_haveNEON(void) const int error = sysctlbyname("hw.optional.neon", &neon, &length, NULL, 0); if (!error) neon = (neon != 0); -#elif defined(__ANDROID__) +#elif defined(__ANDROID__) && defined(__ARM_ARCH) if ( (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM) && ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0) ) { neon = 1; } -#elif defined(__LINUX__) && HAVE_GETAUXVAL && defined(__arm__) +#elif defined(__LINUX__) && defined(__ARM_ARCH) && HAVE_GETAUXVAL if (getauxval(AT_HWCAP) & HWCAP_NEON) { neon = 1; }