*** trunk/livstidsfanger.c 2014/11/07 09:29:54 8
--- trunk/livstidsfanger.c 2014/11/07 12:40:00 9
***************
*** 10,15 ****
--- 10,16 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+ #include <time.h>
#include <unistd.h>
#if __STDC_VERSION__ >= 201112L
***************
*** 41,47 ****
--- 42,52 ----
atexit(visResultater);
signal(SIGINT, signalhandler);
+ #ifdef __FreeBSD__
srandomdev();
+ #else
+ srandom((unsigned int)time(NULL));
+ #endif
memset((void *)&antallBesok, 0, sizeof(antallBesok));
brytere[0] = random() & 1;
|