From 020eb26a4ec67a9ead30b460e0ef977425eda1c0 Mon Sep 17 00:00:00 2001 From: mquinson Date: Mon, 17 Jul 2006 17:16:17 +0000 Subject: [PATCH] Get xbt_init seeding the system random generator git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2603 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xbt/module.c b/src/xbt/module.c index 652b0c795a..f6f079cc8b 100644 --- a/src/xbt/module.c +++ b/src/xbt/module.c @@ -7,6 +7,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "time.h" /* to seed the random generator */ + #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/dynar.h" @@ -38,6 +40,7 @@ xbt_init(int *argc, char **argv) { return; xbt_binary_name = strdup(argv[0]); + srand((unsigned int)time(NULL)); VERB0("Initialize XBT"); xbt_log_init(argc,argv); -- 2.20.1