use /dev/arandom instead of /dev/urandom. reading from /dev/urandom is
too slow. ok bernd@
This commit is contained in:
parent
52b535e41d
commit
c1d4cf76d9
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.68 2009/03/09 17:54:21 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.69 2009/03/23 00:35:44 jakemsr Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -11,7 +11,7 @@ VERSION= 1.8.6
|
||||
PATCHLEVEL= 287
|
||||
DISTNAME= ruby-${VERSION}-p${PATCHLEVEL}
|
||||
SHARED_LIBS= ruby 2.0
|
||||
PKGNAME-main= ruby-${VERSION}.${PATCHLEVEL}p3
|
||||
PKGNAME-main= ruby-${VERSION}.${PATCHLEVEL}p4
|
||||
PKGNAME-iconv= ruby-iconv-${VERSION}.${PATCHLEVEL}p0
|
||||
PKGNAME-gdbm= ruby-gdbm-${VERSION}.${PATCHLEVEL}p0
|
||||
PKGNAME-tk= ruby-tk-${VERSION}.${PATCHLEVEL}p1
|
||||
|
15
lang/ruby/patches/patch-random_c
Normal file
15
lang/ruby/patches/patch-random_c
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-random_c,v 1.1 2009/03/23 00:35:44 jakemsr Exp $
|
||||
--- random.c.orig Sun Mar 22 02:29:55 2009
|
||||
+++ random.c Sun Mar 22 02:30:35 2009
|
||||
@@ -275,7 +275,11 @@ random_seed()
|
||||
memset(digits, 0, big->len * SIZEOF_BDIGITS);
|
||||
|
||||
#ifdef S_ISCHR
|
||||
+# ifdef __OpenBSD__
|
||||
+ if ((fd = open("/dev/arandom", O_RDONLY
|
||||
+# else
|
||||
if ((fd = open("/dev/urandom", O_RDONLY
|
||||
+# endif
|
||||
#ifdef O_NONBLOCK
|
||||
|O_NONBLOCK
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user