Check for AT_HWCAP2 instead of AT_HWCAP where it's used

This commit is contained in:
Frank Denis
2019-10-22 23:24:16 +02:00
parent 1910ca83d8
commit dd5fbb632b
+1 -1
View File
@@ -100,7 +100,7 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features)
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES) != 0x0;
#elif defined(HAVE_GETAUXVAL) && defined(AT_HWCAP) && defined(__aarch64__)
cpu_features->has_armcrypto_aes = (getauxval(AT_HWCAP) & (1L << 3)) != 0;
#elif defined(HAVE_GETAUXVAL) && defined(AT_HWCAP) && defined(__arm__)
#elif defined(HAVE_GETAUXVAL) && defined(AT_HWCAP2) && defined(__arm__)
cpu_features->has_armcrypto_aes = (getauxval(AT_HWCAP2) & (1L << 0)) != 0;
#endif