mirror of
https://git.tukaani.org/xz.git
synced 2025-04-01 21:30:58 +00:00
liblzma: ARM64 CRC32: Change style of the macOS code to match FreeBSD
I didn't test this but it shouldn't change any functionality. Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 (cherry picked from commit fc43cecd32bf9d5f8caa599206b15c9569af1eb6)
This commit is contained in:
parent
32ceb2c36a
commit
9223ad6e78
@ -101,10 +101,11 @@ is_arch_extension_supported(void)
|
|||||||
// CPU feature it tests. The Apple documentation lists the string
|
// CPU feature it tests. The Apple documentation lists the string
|
||||||
// "hw.optional.armv8_crc32", which can be found here:
|
// "hw.optional.armv8_crc32", which can be found here:
|
||||||
// https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics#3915619
|
// https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics#3915619
|
||||||
int err = sysctlbyname("hw.optional.armv8_crc32", &has_crc32,
|
if (sysctlbyname("hw.optional.armv8_crc32", &has_crc32,
|
||||||
&size, NULL, 0);
|
&size, NULL, 0) != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
return !err && has_crc32;
|
return has_crc32;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// If a runtime detection method cannot be found, then this must
|
// If a runtime detection method cannot be found, then this must
|
||||||
|
Loading…
x
Reference in New Issue
Block a user