2.1.5-beta and git master don't build the internal arc4random on OpenBSD because it has arc4random in libc. But there is no function arc4random_addrandom. Looks like this might be an Apple addition?
Maybe this?
diff --git a/evutil_rand.c b/evutil_rand.c
index 046a14b..dd03af2 100644
--- a/evutil_rand.c
+++ b/evutil_rand.c
@@ -195,8 +195,10 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
void
evutil_secure_rng_add_bytes(const char *buf, size_t n)
{
+#if defined(EVENT__HAVE_ARC4RANDOM) && !defined(__APPLE__)
arc4random_addrandom((unsigned char*)buf,
n>(size_t)INT_MAX ? INT_MAX : (int)n);
+#endif
}
void
Er sorry this should be more like:
currently illumos has followed OpenBSD's lead and added arc4random and arc4random_buf without either arc4random_addrandom or arc4random_stir
I wonder if adding configure tests to this effect would be more robust?
Attached are the patches I'm currently testing...
patch-evutil_rand.c could probably use refining.
latest patches updated...
Last edit: Richard PALO 2015-09-19