$OpenBSD: patch-js_src_ctypes_libffi_src_dlmalloc_c,v 1.1 2011/03/30 21:39:14 landry Exp $
--- js/src/ctypes/libffi/src/dlmalloc.c.orig	Sun Aug  1 13:16:05 2010
+++ js/src/ctypes/libffi/src/dlmalloc.c	Sun Aug  1 13:16:17 2010
@@ -2517,17 +2517,15 @@ static int init_mparams(void) {
 
 #if (FOOTERS && !INSECURE)
     {
-#if USE_DEV_RANDOM
       int fd;
       unsigned char buf[sizeof(size_t)];
       /* Try to use /dev/urandom, else fall back on using time */
-      if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 &&
+      if ((fd = open("/dev/arandom", O_RDONLY)) >= 0 &&
           read(fd, buf, sizeof(buf)) == sizeof(buf)) {
         s = *((size_t *) buf);
         close(fd);
       }
       else
-#endif /* USE_DEV_RANDOM */
         s = (size_t)(time(0) ^ (size_t)0x55555555U);
 
       s |= (size_t)8U;    /* ensure nonzero */
