Fix arc4random_addrandom() detecting and fallback (regression)

But this is kind of hot-fix, we definitelly need more sane arc4random
compat layer.

Fixes: #488
Introduced-in: 6541168 ("Detect arch4random_addrandom() existence")
(cherry picked from commit 266f43af7798befa3d27bfabaa9ae699259c3924)
This commit is contained in:
Azat Khuzhin 2017-03-27 15:50:23 +03:00 committed by Azat Khuzhin
parent 27a2ef5c8b
commit 303d6d77c7
No known key found for this signature in database
GPG Key ID: B86086848EF8686D
2 changed files with 4 additions and 1 deletions

View File

@ -53,6 +53,9 @@
/* Define to 1 if you have the `arc4random_buf' function. */
#cmakedefine EVENT__HAVE_ARC4RANDOM_BUF 1
/* Define to 1 if you have the `arc4random_addrandom' function. */
#cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
/* Define if clock_gettime is available in libc */
#cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1

View File

@ -842,7 +842,7 @@ int evutil_secure_rng_init(void);
EVENT2_EXPORT_SYMBOL
int evutil_secure_rng_set_urandom_device_file(char *fname);
#ifdef EVENT__HAVE_ARC4RANDOM_ADDRANDOM
#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
/** Seed the random number generator with extra random bytes.
You should almost never need to call this function; it should be