From 831933425b3406310e70476dc56e822f7ae3c549 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Thu, 4 Dec 2014 23:10:49 +0200 Subject: update unbound from upstream --- external/unbound/compat/getentropy_linux.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'external/unbound/compat/getentropy_linux.c') diff --git a/external/unbound/compat/getentropy_linux.c b/external/unbound/compat/getentropy_linux.c index d51d7952d..32d58a7cd 100644 --- a/external/unbound/compat/getentropy_linux.c +++ b/external/unbound/compat/getentropy_linux.c @@ -48,6 +48,7 @@ #include #include +#include #include #include #ifdef HAVE_GETAUXVAL @@ -77,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); @@ -102,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 @@ -124,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. @@ -235,7 +236,7 @@ nodevrandom: return -1; } -#ifdef CTL_MAXNAME +#ifdef SYS__sysctl static int getentropy_sysctl(void *buf, size_t len) { @@ -265,7 +266,7 @@ sysctlfailed: errno = EIO; return -1; } -#endif /* CTL_MAXNAME */ +#endif /* SYS__sysctl */ static int cl[] = { CLOCK_REALTIME, -- cgit v1.2.3