This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: random device name
authorAndy Broad <andy@broad.ology.org.uk>
Sat, 15 Aug 2015 23:15:56 +0000 (19:15 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 5 Sep 2015 15:12:46 +0000 (11:12 -0400)
util.c

diff --git a/util.c b/util.c
index 641fde0..b5f04a5 100644 (file)
--- a/util.c
+++ b/util.c
@@ -4550,7 +4550,11 @@ Perl_seed(pTHX)
     * if there isn't enough entropy available.  You can compile with
     * PERL_RANDOM_DEVICE to it if you'd prefer Perl to block until there
     * is enough real entropy to fill the seed. */
-#  define PERL_RANDOM_DEVICE "/dev/urandom"
+#  ifdef __amigaos4__
+#    define PERL_RANDOM_DEVICE "RANDOM:SIZE=4"
+#  else
+#    define PERL_RANDOM_DEVICE "/dev/urandom"
+#  endif
 #endif
     fd = PerlLIO_open(PERL_RANDOM_DEVICE, 0);
     if (fd != -1) {