diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-10-31 11:58:25 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-10-31 11:58:25 -0400 |
commit | ea79c9cdf08072304aa6e464629cdd4b96d183a6 (patch) | |
tree | cd6fa54f52b44bfce67645440c210e422bc5fa8b /configure.ac | |
parent | fb45281a7a8147e05616a65333094ea744029230 (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.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 37472c3d2e..5d95ade543 100644 --- a/configure.ac +++ b/configure.ac @@ -60,20 +60,20 @@ AC_C_INLINE AC_TYPE_MODE_T AC_TYPE_PID_T AC_CHECK_MEMBERS([struct stat.st_rdev]) -AC_CHECK_DECLS([gettid, name_to_handle_at, accept4, mkostemp], [], [], [[#include <sys/types.h> +AC_CHECK_DECLS([getrandom, gettid, name_to_handle_at, accept4, mkostemp], [], [], [[#include <sys/types.h> #include <unistd.h> #include <sys/mount.h> #include <fcntl.h> -#include <sys/socket.h>]]) +#include <sys/socket.h> +#include <linux/random.h>]]) AC_CHECK_SIZEOF(pid_t) AC_CHECK_SIZEOF(uid_t) AC_CHECK_SIZEOF(gid_t) AC_CHECK_SIZEOF(time_t) -AC_CHECK_SIZEOF(rlim_t,,[ - #include <sys/time.h> - #include <sys/resource.h> -]) +AC_CHECK_SIZEOF(rlim_t,,[[ +#include <sys/time.h> +#include <sys/resource.h>]]) # Checks for library functions. AC_FUNC_CHOWN |