diff options
author | Azat Khuzhin <azat@libevent.org> | 2019-09-03 00:34:35 +0300 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2019-09-03 00:50:10 +0300 |
commit | 86f55b0420f864b518475f781ce7a3c619180b12 (patch) | |
tree | f5ffa2acb7eb445b2c11d3126259b398af3cdafa /configure.ac | |
parent | 13b8fc39fd4000de2c836b0acdc52ae5b4c757c7 (diff) | |
download | libevent-86f55b0420f864b518475f781ce7a3c619180b12.tar.gz |
arc4random: replace sysctl() with getrandom (on linux)
Since sysctl() is deprecated for a long-long time, according to
sysctl(2):
Since Linux 2.6.24, uses of this system call result in warnings in the kernel log.
Fixes: #890
Suggested-by: Pierce Lopez
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 8dd1aaa5..b584341c 100644 --- a/configure.ac +++ b/configure.ac @@ -248,6 +248,7 @@ AC_CHECK_HEADERS([ \ sys/timerfd.h \ sys/uio.h \ sys/wait.h \ + sys/random.h \ errno.h \ ]) @@ -256,6 +257,7 @@ AC_CHECK_HEADERS(sys/sysctl.h, [], [], [ #include <sys/param.h> #endif ]) + if test "x$ac_cv_header_sys_queue_h" = "xyes"; then AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h) AC_EGREP_CPP(yes, @@ -328,7 +330,7 @@ if test "x$ac_cv_header_sys_time_h" = "xyes"; then fi if test "x$ac_cv_header_sys_sysctl_h" = "xyes"; then - AC_CHECK_DECLS([CTL_KERN, KERN_RANDOM, RANDOM_UUID, KERN_ARND], [], [], + AC_CHECK_DECLS([CTL_KERN, KERN_ARND], [], [], [[#include <sys/types.h> #include <sys/sysctl.h>]] ) @@ -390,6 +392,7 @@ AC_CHECK_FUNCS([ \ usleep \ vasprintf \ getservbyname \ + getrandom \ ]) AM_CONDITIONAL(STRLCPY_IMPL, [test x"$ac_cv_func_strlcpy" = xno]) |