aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eina/eina_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_main.c')
-rw-r--r--src/lib/eina/eina_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/eina/eina_main.c b/src/lib/eina/eina_main.c
index 667c3a1b7..271ce2b63 100644
--- a/src/lib/eina/eina_main.c
+++ b/src/lib/eina/eina_main.c
@@ -99,6 +99,7 @@ static int _eina_log_dom = -1;
EAPI Eina_Bool _eina_threads_activated = EINA_FALSE;
EAPI Eina_Error EINA_ERROR_NOT_MAIN_LOOP = 0;
+EAPI unsigned int eina_seed = 0;
static const char EINA_ERROR_NOT_MAIN_LOOP_STR[] = "Main loop thread check failed.";
@@ -249,6 +250,10 @@ eina_init(void)
if (EINA_LIKELY(_eina_main_count > 0))
return ++_eina_main_count;
+ srand(time(NULL));
+ while (eina_seed == 0)
+ eina_seed = rand();
+
#ifdef MT
if ((getenv("EINA_MTRACE")) && (getenv("MALLOC_TRACE")))
{