/[livstidsfanger]/trunk/livstidsfanger.c
ViewVC logotype

Diff of /trunk/livstidsfanger.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

  Revision 8 by trond, 2014-11-07T09:29:54Z
vs.
  Revision 9 by trond, 2014-11-07T12:40:00Z
*** 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;


 

svn@ximalas.info
ViewVC Help
Powered by ViewVC 1.3.0-beta1