$OpenBSD$
--- src/types.h.orig	Sun Jul 26 15:18:45 2015
+++ src/types.h	Sun Jul 26 15:20:19 2015
@@ -37,7 +37,7 @@ typedef int64_t  s64;
 
 /* PRNG wrapper, of no better place to put it. */
 
-#define R(_ceil) ((u32)(random() % (_ceil)))
+#define R(_ceil) ((u32)(arc4random() % (_ceil)))
 
 #ifndef MIN
 #  define MIN(_a,_b) ((_a) > (_b) ? (_b) : (_a))
