summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-12-21 17:21:30 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-12-21 17:21:30 +0100
commit1f622660bedb0f4198667536a742621c684f07c7 (patch)
treed6b342fb8f64718398a7a6cbb160e8e91a2efc31
parent27ef13bd3ea5dd9473f9633b241efb9b90143a75 (diff)
parentdb467660a1cbbd2bc65b8c09fc93546a9f391ae4 (diff)
downloadnettle-1f622660bedb0f4198667536a742621c684f07c7.tar.gz
Merge branch 'undefined' into 'master'
[PowerPC64] Skip using getauxval() when it is not available See merge request nettle/nettle!16
-rw-r--r--fat-ppc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fat-ppc.c b/fat-ppc.c
index 847af14f..c7f0d11a 100644
--- a/fat-ppc.c
+++ b/fat-ppc.c
@@ -42,7 +42,9 @@
#if defined(_AIX)
# include <sys/systemcfg.h>
-#elif defined(__linux__)
+#elif defined(__linux__) && defined(__GLIBC__) && \
+ defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16)
+# define USE_GETAUXVAL 1
# include <asm/cputable.h>
# include <sys/auxv.h>
#elif defined(__FreeBSD__)
@@ -116,7 +118,7 @@ get_ppc_features (struct ppc_features *features)
#else
unsigned long hwcap = 0;
unsigned long hwcap2 = 0;
-# if defined(__linux__)
+# if USE_GETAUXVAL
hwcap = getauxval(AT_HWCAP);
hwcap2 = getauxval(AT_HWCAP2);
# elif defined(__FreeBSD__)