Skip to content

Commit 3e83bdd

Browse files
committed
Fix pg_popcount_aarch64.c to build with ancient glibc releases.
Like commit 6d969ca, except here we are mopping up after 519338a. (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
1 parent 77fb395 commit 3e83bdd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/port/pg_popcount_aarch64.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
#if defined(HAVE_ELF_AUX_INFO) || defined(HAVE_GETAUXVAL)
2525
#include <sys/auxv.h>
26+
/* Ancient glibc releases don't include the HWCAPxxx macros in sys/auxv.h */
27+
#if defined(__linux__) && !defined(HWCAP_SVE)
28+
#include <asm/hwcap.h>
29+
#endif
2630
#endif
2731
#endif
2832

0 commit comments

Comments
 (0)