]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- getauxval test for ppc64 linux compatibility.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Jan 2015 09:13:32 +0000 (09:13 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Jan 2015 09:13:32 +0000 (09:13 +0000)
git-svn-id: file:///svn/unbound/trunk@3293 be551aaa-1e26-0410-a405-d3ace91eadb9

compat/getentropy_linux.c
config.h.in
configure
configure.ac
doc/Changelog

index 32d58a7cdbb95ff05eedd86b3c55c88e3bc1091e..60e010db713aaad66a351f83de0987f1de2e3110 100644 (file)
@@ -474,22 +474,24 @@ getentropy_fallback(void *buf, size_t len)
 
                        HD(cnt);
                }
-#ifdef AT_RANDOM
+#ifdef HAVE_GETAUXVAL
+#  ifdef AT_RANDOM
                /* Not as random as you think but we take what we are given */
                p = (char *) getauxval(AT_RANDOM);
                if (p)
                        HR(p, 16);
-#endif
-#ifdef AT_SYSINFO_EHDR
+#  endif
+#  ifdef AT_SYSINFO_EHDR
                p = (char *) getauxval(AT_SYSINFO_EHDR);
                if (p)
                        HR(p, pgs);
-#endif
-#ifdef AT_BASE
+#  endif
+#  ifdef AT_BASE
                p = (char *) getauxval(AT_BASE);
                if (p)
                        HD(p);
-#endif
+#  endif
+#endif /* HAVE_GETAUXVAL */
 
                SHA512_Final(results, &ctx);
                memcpy((char*)buf + i, results, min(sizeof(results), len - i));
index 2b7770b5c23ac2a47b4e2ec8fd23c1e350ff0f18..1be23c3889d0371c332d6fe7024151f14260b4b8 100644 (file)
 /* Whether getaddrinfo is available */
 #undef HAVE_GETADDRINFO
 
+/* Define to 1 if you have the `getauxval' function. */
+#undef HAVE_GETAUXVAL
+
 /* Define to 1 if you have the `getentropy' function. */
 #undef HAVE_GETENTROPY
 
index e02f2bb2b2b260c6573d07e78fd3f7d1dde15fa8..1d230bdd2d229e76068962d9a805cee3d1d3e8ab 100755 (executable)
--- a/configure
+++ b/configure
@@ -18254,6 +18254,17 @@ _ACEOF
 
 fi
 
+done
+
+                               for ac_func in getauxval
+do :
+  ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
+if test "x$ac_cv_func_getauxval" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETAUXVAL 1
+_ACEOF
+
+fi
 done
 
                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
index 240556352835c99559f24c58b0a7199e54186721..df59227932a913da3cb0f601c1d6b5871e87e4df 100644 (file)
@@ -1021,6 +1021,7 @@ if test "$USE_NSS" = "no"; then
                                        AC_LIBOBJ(sha512)
                                ])
                                AC_CHECK_HEADERS([sys/sysctl.h],,, [AC_INCLUDES_DEFAULT])
+                               AC_CHECK_FUNCS([getauxval])
                                AC_SEARCH_LIBS([clock_gettime], [rt])
                        ;;
                        esac
index 3a72bcf803c14d961af7344bc1e348ffd8224658..758ab381f1b79ae6146ec65acfcfc0434a36d57b 100644 (file)
@@ -1,3 +1,6 @@
+5 January 2015: Wouter
+       - getauxval test for ppc64 linux compatibility.
+
 9 December 2014: Wouter
        - svn trunk has 1.5.2 in development.
        - config.guess and config.sub update from libtoolize.