From 6a51707551270eb2d17ed53c4256cc89299fa3b7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 18 Nov 2025 16:16:51 -0500 Subject: [PATCH] Fix pg_popcount_aarch64.c to build with ancient glibc releases. Like commit 6d969ca68, except here we are mopping up after 519338ace. (There are no other uses of in the tree, so we should be done now.) Reported-by: GaoZengqi Author: Tom Lane Discussion: https://postgr.es/m/CAFmBtr3Av62-jBzdhFkDHXJF9vQmNtSnH2upwODjnRcsgdTytw@mail.gmail.com Backpatch-through: 18 --- src/port/pg_popcount_aarch64.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5