1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

devel/libevent: Don't use arc4random_addrandom.

PR:		230764, 230756
Approved by:	portmgr (antoine)
This commit is contained in:
Xin LI 2018-08-26 07:56:39 +00:00
parent 7232456d14
commit 2508a88d61
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=478104
2 changed files with 14 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= libevent
PORTVERSION= 2.1.8
PORTREVISION= 1
PORTREVISION= 2
DISTVERSIONPREFIX= release-
DISTVERSIONSUFFIX= -stable
CATEGORIES= devel

View File

@ -0,0 +1,13 @@
--- evutil_rand.c.orig 2017-01-25 23:37:15 UTC
+++ 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)
{
+#ifdef arc4random_addrandom
arc4random_addrandom((unsigned char*)buf,
n>(size_t)INT_MAX ? INT_MAX : (int)n);
+#endif
}
void