diff --git a/src/port/pg_popcount_aarch64.c b/src/port/pg_popcount_aarch64.c index e515e4d45b8..0b6b86de4d0 100644 --- a/src/port/pg_popcount_aarch64.c +++ b/src/port/pg_popcount_aarch64.c @@ -23,6 +23,10 @@ #if defined(HAVE_ELF_AUX_INFO) || defined(HAVE_GETAUXVAL) #include +/* Ancient glibc releases don't include the HWCAPxxx macros in sys/auxv.h */ +#if defined(__linux__) && !defined(HWCAP_SVE) +#include +#endif #endif #endif