1 #include <sys/types.h> 2 #include <stdlib.h> 3 4 #include "config.h" 5 6 /* 7 * For those poor operating systems, that do not have a PRNG in their 8 * libc. We do not require cryptographic random numbers for this 9 * application anyway. Screw you, hippy! 10 */ 11 12 u_int32_t 13 arc4random(void) 14 { 15 static int init; 16 17 if (!init) { 18 init = 1; 19 srandom(time(NULL)); 20 } 21 return (random()); 22 }