summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-29 17:06:32 +0100
committerLennart Poettering <lennart@poettering.net>2014-10-29 17:06:32 +0100
commit539618a0ddc2dc7f0fbe28de2ae0e07b34c81e60 (patch)
tree23a4a87b839413ee39636eb116b5316571c88878 /configure.ac
parentd0159fdc7a1009027f019f763106aa13256cf030 (diff)
util: make use of the new getrandom() syscall if it is available when needing entropy
Doesn't require an fd, and could be a bit faster, so let's make use of it, if it is available.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f8a95cb9c8..82bc7a63ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,7 +308,7 @@ LIBS="$save_LIBS"
AC_CHECK_FUNCS([memfd_create])
AC_CHECK_FUNCS([__secure_getenv secure_getenv])
-AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN],
+AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, LO_FLAGS_PARTSCAN],
[], [], [[
#include <sys/types.h>
#include <unistd.h>
@@ -316,6 +316,7 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN]
#include <fcntl.h>
#include <sched.h>
#include <linux/loop.h>
+#include <linux/random.h>
]])
AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,