summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-07-15 21:55:04 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-07-15 21:55:06 +0200
commitb9e643f32b3aefb48e3556a9b21c08596515ecda (patch)
treefa96547d8ac1e18bb2ad3a08a958514088799b05 /configure.ac
parent76bdb7093c1b336612a58b307167f338f2142acc (diff)
downloadgnutls-b9e643f32b3aefb48e3556a9b21c08596515ecda.tar.gz
configure: prevent a version of getentropy() in a linux libc to be used
For now, we auto-detect and switch between getrandom() and /dev/urandom when the former is not available. With the complexity of dealing with libc's that have the feature but kernel not supporting it, or vice versa it is best keep things simple.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 9d3681b006..37fc1d1d3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -189,7 +189,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([
AC_MSG_CHECKING([for getentropy])
AC_LINK_IFELSE([AC_LANG_PROGRAM([
- #include <unistd.h>],[
+ #include <unistd.h>
+ #ifdef __linux__
+ #error 1
+ #endif
+ ],[
getentropy(0, 0);
])],
[AC_MSG_RESULT(yes)