summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-10-21 20:57:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-10-21 20:57:58 (GMT)
commitcff2f506464abf93c35feb6d644ad08b79feb856 (patch)
tree342c686ff7dcc4a5ed12f8af8e4afa5483a8609f /src/core
parent3cf2601f5d652037b79ca0cdaee051e4d9679c74 (diff)
Initialized the libc random generator using the time and the process ID.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/core.c b/src/core/core.c
index ec7b0fc..b949e0a 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -24,6 +24,11 @@
#include "core.h"
+#include <stdlib.h>
+#include <time.h>
+#include <unistd.h>
+
+
#include <config.h>
@@ -62,6 +67,8 @@ bool load_all_basic_components(void)
{
result = true;
+ srand(time(NULL) + getpid());
+
add_pixmap_directory(PACKAGE_DATA_DIR);
add_pixmap_directory(PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps");