diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc index d7eedd1ca4f..e27719cf3cf 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_PMULL) uint64_t hwcaps = getauxval(AT_HWCAP); return (hwcaps & HWCAP_CRC32) && (hwcaps & HWCAP_PMULL); +#else + return false; +#endif } #else