summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-11-18 16:16:46 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2025-11-18 16:16:46 -0500
commit3e83bdd35a5f38511b396a40f060cbc49b62e74d (patch)
tree97b0bf120e907ac1095ae936d0e4ef65d7aa3fcc /src
parent77fb3959a45d1a748cb28f3f58da18c6645b45d3 (diff)
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 <sys/auxv.h> in the tree, so we should be done now.) Reported-by: GaoZengqi <pgf00a@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAFmBtr3Av62-jBzdhFkDHXJF9vQmNtSnH2upwODjnRcsgdTytw@mail.gmail.com Backpatch-through: 18
Diffstat (limited to 'src')
-rw-r--r--src/port/pg_popcount_aarch64.c4
1 files changed, 4 insertions, 0 deletions
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 <sys/auxv.h>
+/* Ancient glibc releases don't include the HWCAPxxx macros in sys/auxv.h */
+#if defined(__linux__) && !defined(HWCAP_SVE)
+#include <asm/hwcap.h>
+#endif
#endif
#endif