From: Maamoun TK Date: Sun, 20 Dec 2020 17:03:11 +0000 (+0100) Subject: [PowerPC64] Skip using getauxval() when it is not available X-Git-Tag: nettle_3.7rc1~10^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b75b5eed461dd21f126a2fd01eb957d0d71b891;p=thirdparty%2Fnettle.git [PowerPC64] Skip using getauxval() when it is not available --- diff --git a/fat-ppc.c b/fat-ppc.c index 847af14f..365d4d9b 100644 --- a/fat-ppc.c +++ b/fat-ppc.c @@ -43,8 +43,11 @@ #if defined(_AIX) # include #elif defined(__linux__) -# include -# include +# if defined(__GLIBC__) && defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16) +# define USE_GETAUXVAL 1 +# include +# include +# endif #elif defined(__FreeBSD__) # include # ifdef PPC_FEATURE2_HAS_VEC_CRYPTO @@ -116,7 +119,7 @@ get_ppc_features (struct ppc_features *features) #else unsigned long hwcap = 0; unsigned long hwcap2 = 0; -# if defined(__linux__) +# if defined(__linux__) && USE_GETAUXVAL hwcap = getauxval(AT_HWCAP); hwcap2 = getauxval(AT_HWCAP2); # elif defined(__FreeBSD__)