1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Update: Use timing_get_time() not time() for seeding, it adds about 10 bits

This commit is contained in:
Philipp Schafft 2020-10-22 08:42:05 +00:00
parent 8d80ef6a8b
commit 6091b6b278

View File

@ -29,6 +29,7 @@
#endif
#include "common/thread/thread.h"
#include "common/timing/timing.h"
#include "prng.h"
#include "digest.h"
@ -53,7 +54,7 @@ static void prng_initial_seed(void)
{
struct {
int debian;
time_t t;
uint64_t t;
#ifdef HAVE_UNAME
struct utsname utsname;
#endif
@ -67,7 +68,7 @@ static void prng_initial_seed(void)
memset(&seed, 0, sizeof(seed));
seed.debian = 4;
seed.t = time(NULL);
seed.t = timing_get_time();
#ifdef HAVE_UNAME
uname(&seed.utsname);
#endif