From 293796fcf662cc6bea213306fbdde5eaedeb2ee3 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Thu, 23 Jul 2009 07:03:09 +0000 Subject: [PATCH] Fix #65, randomize rand_seed on startup --- src/iodine.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/iodine.c b/src/iodine.c index 553e843..3247816 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef WINDOWS32 #include "windows.h" @@ -1183,6 +1184,9 @@ main(int argc, char **argv) #ifdef WINDOWS32 WSAStartup(req_version, &wsa_data); #endif + + srand((unsigned) time(NULL)); + rand_seed = rand(); #if !defined(BSD) && !defined(__GLIBC__) __progname = strrchr(argv[0], '/');