mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 04:25:10 -07:00
On Apple devices, the ARM64_V8 subtype always has the crypto extensions
This commit is contained in:
parent
dd5fbb632b
commit
a8dc93192d
@ -91,7 +91,9 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features)
|
|||||||
if (sysctlbyname("hw.cputype", &cpu_type, &cpu_type_len,
|
if (sysctlbyname("hw.cputype", &cpu_type, &cpu_type_len,
|
||||||
NULL, 0) == 0 && cpu_type == CPU_TYPE_ARM64 &&
|
NULL, 0) == 0 && cpu_type == CPU_TYPE_ARM64 &&
|
||||||
sysctlbyname("hw.cpusubtype", &cpu_subtype, &cpu_subtype_len,
|
sysctlbyname("hw.cpusubtype", &cpu_subtype, &cpu_subtype_len,
|
||||||
NULL, 0) == 0 && cpu_type == CPU_SUBTYPE_ARM64E) {
|
NULL, 0) == 0 &&
|
||||||
|
(cpu_subtype == CPU_SUBTYPE_ARM64E ||
|
||||||
|
cpu_subtype == CPU_SUBTYPE_ARM64_V8)) {
|
||||||
cpu_features->has_armcrypto_aes = 1;
|
cpu_features->has_armcrypto_aes = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user