]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix bug#632: unbound fails to build on AArch64, protects release-1.5.1rc2
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 2 Dec 2014 00:19:42 +0000 (00:19 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 2 Dec 2014 00:19:42 +0000 (00:19 +0000)
  getentropy compat code from calling sysctl if it is has been removed.

git-svn-id: file:///svn/unbound/trunk@3287 be551aaa-1e26-0410-a405-d3ace91eadb9

compat/getentropy_linux.c
doc/Changelog

index 20e28560a2da79f597c0fade18999b619fc48b1d..32d58a7cdbb95ff05eedd86b3c55c88e3bc1091e 100644 (file)
@@ -78,7 +78,7 @@ extern int main(int, char *argv[]);
 #endif
 static int gotdata(char *buf, size_t len);
 static int getentropy_urandom(void *buf, size_t len);
-#ifdef CTL_MAXNAME
+#ifdef SYS__sysctl
 static int getentropy_sysctl(void *buf, size_t len);
 #endif
 static int getentropy_fallback(void *buf, size_t len);
@@ -103,7 +103,7 @@ getentropy(void *buf, size_t len)
        if (ret != -1)
                return (ret);
 
-#ifdef CTL_MAXNAME
+#ifdef SYS__sysctl
        /*
         * Try to use sysctl CTL_KERN, KERN_RANDOM, RANDOM_UUID.
         * sysctl is a failsafe API, so it guarantees a result.  This
@@ -125,7 +125,7 @@ getentropy(void *buf, size_t len)
        ret = getentropy_sysctl(buf, len);
        if (ret != -1)
                return (ret);
-#endif /* CTL_MAXNAME */
+#endif /* SYS__sysctl */
 
        /*
         * Entropy collection via /dev/urandom and sysctl have failed.
@@ -236,7 +236,7 @@ nodevrandom:
        return -1;
 }
 
-#ifdef CTL_MAXNAME
+#ifdef SYS__sysctl
 static int
 getentropy_sysctl(void *buf, size_t len)
 {
@@ -266,7 +266,7 @@ sysctlfailed:
        errno = EIO;
        return -1;
 }
-#endif /* CTL_MAXNAME */
+#endif /* SYS__sysctl */
 
 static int cl[] = {
        CLOCK_REALTIME,
index d2687f0feea8d4e59e747da1dc988a7d02449d29..c82ae8ade7d58074a2b07bb07436fed037e691eb 100644 (file)
@@ -1,3 +1,7 @@
+1 December 2014: Wouter
+       - Fix bug#632: unbound fails to build on AArch64, protects
+         getentropy compat code from calling sysctl if it is has been removed.
+
 29 November 2014: Wouter
        - Add include to getentropy_linux.c, hopefully fixing debian build.