Commit 94c3454d authored by Matthieu Herrb's avatar Matthieu Herrb Committed by Adam Jackson

Brown bag commit to fix 957e8d (arc4random_buf() support)

- typo in #ifdef check
- also need to add AC_CHECK_FUNCS([arc4random_buf])

Reported-by Eric Engestrom. Thanks
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: Matthieu Herrb's avatarMatthieu Herrb <matthieu@herrb.eu>
(cherry picked from commit 386fbbe4)
parent b0298c02
......@@ -226,6 +226,7 @@ AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\
AM_CONDITIONAL(POLL, [test "x$ac_cv_func_poll" = "xyes"])
AC_CHECK_LIB([bsd], [arc4random_buf])
AC_CHECK_FUNCS([arc4random_buf])
AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include <errno.h>]])
......
......@@ -305,7 +305,7 @@ GenerateAuthorization(unsigned name_length,
void
GenerateRandomData(int len, char *buf)
{
#ifdef HAVE_ARC4RANDOMBUF
#ifdef HAVE_ARC4RANDOM_BUF
arc4random_buf(buf, len);
#else
int fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment