From ae058954007f409ee087e9e2a0a677bbf3ed39a9 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 9 Mar 2017 10:52:59 +0100 Subject: sysrng-linux: define _rnd_get_system_entropy unconditionally This fixes compilation in systems without getrandom(). Signed-off-by: Nikos Mavrogiannopoulos --- lib/nettle/sysrng-linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ -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) { -- cgit v1.2.1