Some systems have arc4random() but not arc4random_buf()
This commit is contained in:
parent
1fe019c482
commit
afb89c7e16
@ -371,7 +371,7 @@ dnl Checks for functions and headers
|
|||||||
AC_CHECK_FUNC(clock_gettime, , [AC_CHECK_LIB(rt, clock_gettime)])
|
AC_CHECK_FUNC(clock_gettime, , [AC_CHECK_LIB(rt, clock_gettime)])
|
||||||
AC_CHECK_FUNC(fegetenv, , [AC_CHECK_LIB(m, fegetenv)])
|
AC_CHECK_FUNC(fegetenv, , [AC_CHECK_LIB(m, fegetenv)])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([SecureZeroMemory arc4random])
|
AC_CHECK_FUNCS([SecureZeroMemory arc4random arc4random_buf])
|
||||||
|
|
||||||
AC_SUBST([LIBTOOL_EXTRA_FLAGS])
|
AC_SUBST([LIBTOOL_EXTRA_FLAGS])
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ _sodium_alignedcalloc(unsigned char ** const unaligned_p, const size_t len)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*unaligned_p = unaligned;
|
*unaligned_p = unaligned;
|
||||||
#ifdef HAVE_ARC4RANDOM
|
#ifdef HAVE_ARC4RANDOM_BUF
|
||||||
(void) i;
|
(void) i;
|
||||||
arc4random_buf(unaligned, len + (size_t) 256U);
|
arc4random_buf(unaligned, len + (size_t) 256U);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user