diff --git a/src/libsodium/sodium/runtime.c b/src/libsodium/sodium/runtime.c index 48339955..c3fc2e03 100644 --- a/src/libsodium/sodium/runtime.c +++ b/src/libsodium/sodium/runtime.c @@ -66,9 +66,9 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features) #if defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) cpu_features->has_neon = 1; -#elif defined(HAVE_ANDROID_GETCPUFEATURES) && defined(ANDROID_CPU_ARM_FEATURE_NEON) +#elif defined(HAVE_ANDROID_GETCPUFEATURES) cpu_features->has_neon = - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0x0; + (android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_ASIMD) != 0x0; #elif (defined(__aarch64__) || defined(_M_ARM64)) && defined(AT_HWCAP) # ifdef HAVE_GETAUXVAL cpu_features->has_neon = (getauxval(AT_HWCAP) & (1L << 1)) != 0; @@ -117,9 +117,9 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features) cpu_features->has_armcrypto = 1; } } -#elif defined(HAVE_ANDROID_GETCPUFEATURES) && defined(ANDROID_CPU_ARM_FEATURE_AES) +#elif defined(HAVE_ANDROID_GETCPUFEATURES) cpu_features->has_armcrypto = - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES) != 0x0; + (android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_AES) != 0x0; #elif (defined(__aarch64__) || defined(_M_ARM64)) && defined(AT_HWCAP) # ifdef HAVE_GETAUXVAL cpu_features->has_armcrypto = (getauxval(AT_HWCAP) & (1L << 3)) != 0;