diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-12-21 17:21:30 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-12-21 17:21:30 +0100 |
commit | 1f622660bedb0f4198667536a742621c684f07c7 (patch) | |
tree | d6b342fb8f64718398a7a6cbb160e8e91a2efc31 | |
parent | 27ef13bd3ea5dd9473f9633b241efb9b90143a75 (diff) | |
parent | db467660a1cbbd2bc65b8c09fc93546a9f391ae4 (diff) | |
download | nettle-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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__) |