diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2025-11-18 16:16:46 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2025-11-18 16:16:46 -0500 |
| commit | 3e83bdd35a5f38511b396a40f060cbc49b62e74d (patch) | |
| tree | 97b0bf120e907ac1095ae936d0e4ef65d7aa3fcc | |
| parent | 77fb3959a45d1a748cb28f3f58da18c6645b45d3 (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
| -rw-r--r-- | src/port/pg_popcount_aarch64.c | 4 |
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 |
