diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | lib/nettle/sysrng-linux.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index a02579afff..a322e625b2 100644 --- a/configure.ac +++ b/configure.ac @@ -215,11 +215,11 @@ dnl check for getrandom() rnd_variant="auto-detect" AC_MSG_CHECKING([for getrandom]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ - #include <linux/random.h>],[ + #include <sys/random.h>],[ getrandom(0, 0, 0); ])], [AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_LINUX_GETRANDOM], 1, [Enable the Linux getrandom function]) + AC_DEFINE([HAVE_GETRANDOM], 1, [Enable the Linux getrandom function]) rnd_variant=getrandom], [AC_MSG_RESULT(no)]) diff --git a/lib/nettle/sysrng-linux.c b/lib/nettle/sysrng-linux.c index 87786ce9fc..1afb8046eb 100644 --- a/lib/nettle/sysrng-linux.c +++ b/lib/nettle/sysrng-linux.c @@ -53,8 +53,8 @@ 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> +# ifdef HAVE_GETRANDOM +# include <sys/random.h> # else # include <sys/syscall.h> # undef getrandom |