From a197221b2055c4472a0c6782ae5eac386cdf6863 Mon Sep 17 00:00:00 2001 From: Dertosh Date: Tue, 10 Dec 2024 00:35:35 +0300 Subject: [PATCH] Update cpu_detect.cc fix hw crc32 and AES capability checkfix undefined https://github.com/JuliaLang/julia/issues/26458 https://github.com/memcached/memcached/pull/744 --- absl/crc/internal/cpu_detect.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc index d7eedd1ca4f..b356fa09099 100644 --- a/absl/crc/internal/cpu_detect.cc +++ b/absl/crc/internal/cpu_detect.cc @@ -269,8 +269,12 @@ CpuType GetCpuType() { } bool SupportsArmCRC32PMULL() { +#if defined(HWCAP_CRC32) && defined(HWCAP_CRC32PMULL) uint64_t hwcaps = getauxval(AT_HWCAP); return (hwcaps & HWCAP_CRC32) && (hwcaps & HWCAP_PMULL); +#else + return false; +#endif } #else