summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-09 10:52:59 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-09 10:53:01 +0100
commitae058954007f409ee087e9e2a0a677bbf3ed39a9 (patch)
tree3d345c1439f2e92c61d364566630a64e3d105ce4
parent2d3b2de12224531236c18d8d1f4fece69a6d135e (diff)
downloadgnutls-ae058954007f409ee087e9e2a0a677bbf3ed39a9.tar.gz
sysrng-linux: define _rnd_get_system_entropy unconditionally
This fixes compilation in systems without getrandom(). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/nettle/sysrng-linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/nettle/sysrng-linux.c b/lib/nettle/sysrng-linux.c
index d3533dc411..87786ce9fc 100644
--- a/lib/nettle/sysrng-linux.c
+++ b/lib/nettle/sysrng-linux.c
@@ -50,6 +50,8 @@ static int _gnutls_urandom_fd = -1;
static ino_t _gnutls_urandom_fd_ino = 0;
static dev_t _gnutls_urandom_fd_rdev = 0;
+get_entropy_func _rnd_get_system_entropy = NULL;
+
#if defined(__linux__)
# ifdef HAVE_LINUX_GETRANDOM
# include <linux/random.h>
@@ -63,7 +65,6 @@ static dev_t _gnutls_urandom_fd_rdev = 0;
# endif
# endif
-get_entropy_func _rnd_get_system_entropy = NULL;
static unsigned have_getrandom(void)
{