diff --git a/tests/src/random.c b/tests/src/random.c index 340b935..1fa5a28 100644 --- a/tests/src/random.c +++ b/tests/src/random.c @@ -9,6 +9,7 @@ static void init(unsigned int seed) { + if (!seed) seed = time(0); printf("\e[36mRandom module initialized with seed: \e[m\e[32m%u\n\e[m", seed); put_separator(); srand(seed); @@ -16,7 +17,7 @@ static void init(unsigned int seed) { int random_init(int argc, char** argv) { if (argc < 2) { - init(time(0)); + init(0); } else init(atol(argv[1])); return 0; diff --git a/tests/src/time.c b/tests/src/time.c index 1151708..255f799 100644 --- a/tests/src/time.c +++ b/tests/src/time.c @@ -3,7 +3,9 @@ #include #include +#ifndef __USE_MISC #define __USE_MISC +#endif #include #include #include