Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
net-p2p/gtk-gnutella: Do not call arc4random_stir or arc4random_addra…
Browse files Browse the repository at this point in the history
…ndom.

PR:		230829, 230756
Approved by:	portmgr (antoine)
  • Loading branch information
delphij committed Aug 26, 2018
1 parent 2508a88 commit add6abb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions net-p2p/gtk-gnutella/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

PORTNAME= gtk-gnutella
PORTVERSION= 1.1.13
PORTREVISION= 1
CATEGORIES= net-p2p ipv6
MASTER_SITES= SF

Expand Down
14 changes: 14 additions & 0 deletions net-p2p/gtk-gnutella/files/patch-src_lib_arc4random.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- src/lib/arc4random.c.orig 2017-10-22 16:12:09 UTC
+++ src/lib/arc4random.c
@@ -298,9 +298,11 @@ arc4random64(void)
void G_COLD
arc4random_stir_once(void)
{
+#ifdef arc4random_stir
static once_flag_t done;

once_flag_run(&done, arc4random_stir);
+#endif
}

/***
12 changes: 12 additions & 0 deletions net-p2p/gtk-gnutella/files/patch-src_lib_random.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- src/lib/random.c.orig 2017-10-22 16:12:12 UTC
+++ src/lib/random.c
@@ -1058,7 +1058,9 @@ random_entropy(void *unused)
break;
case RANDOM_ARC4:
RANDOM_STATS_INC(arc4_distributed);
+#ifdef arc4random_addrandom
arc4random_addrandom(entropy, (int) ELEN);
+#endif
break;
case RANDOM_CMWC:
RANDOM_STATS_INC(cmwc_distributed);

0 comments on commit add6abb

Please sign in to comment.