]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
ppc: Fix use of __GLIBC_PREREQ in fat-ppc.c.
authorNiels Möller <nisse@lysator.liu.se>
Sun, 10 Jan 2021 19:39:49 +0000 (20:39 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 10 Jan 2021 19:39:49 +0000 (20:39 +0100)
* fat-ppc.c: Don't use __GLIBC_PREREQ in the same preprocessor
conditional as defined(__GLIBC_PREREQ), but move to a nested #if
conditional. Fixes compile error on OpenBSD/powerpc64, reported by
Jasper Lievisse Adriaanse.

ChangeLog
fat-ppc.c

index 578f259135fce985e8e3f55d9a4e84ed31cc4bac..a55068977b78730046e5f81225d93a48c53a7bc1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-10  Niels Möller  <nisse@lysator.liu.se>
+
+       * fat-ppc.c: Don't use __GLIBC_PREREQ in the same preprocessor
+       conditional as defined(__GLIBC_PREREQ), but move to a nested #if
+       conditional. Fixes compile error on OpenBSD/powerpc64, reported by
+       Jasper Lievisse Adriaanse.
+
 2021-01-04  Niels Möller  <nisse@lysator.liu.se>
 
        * Released Nettle-3.7.
index c7f0d11a6d89a51d02333e558f880543d5931fdd..3adbb88c3a96c3a3ca552a2d0912bce9a56b5e01 100644 (file)
--- a/fat-ppc.c
+++ b/fat-ppc.c
 
 #if defined(_AIX)
 # include <sys/systemcfg.h>
-#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(__linux__) && defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+# if __GLIBC_PREREQ(2, 16)
+#  define USE_GETAUXVAL 1
+#  include <asm/cputable.h>
+#  include <sys/auxv.h>
+# endif
 #elif defined(__FreeBSD__)
 # include <machine/cpu.h>
 # ifdef PPC_FEATURE2_HAS_VEC_CRYPTO