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:
parent
8d80ef6a8b
commit
6091b6b278
@ -29,6 +29,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common/thread/thread.h"
|
#include "common/thread/thread.h"
|
||||||
|
#include "common/timing/timing.h"
|
||||||
|
|
||||||
#include "prng.h"
|
#include "prng.h"
|
||||||
#include "digest.h"
|
#include "digest.h"
|
||||||
@ -53,7 +54,7 @@ static void prng_initial_seed(void)
|
|||||||
{
|
{
|
||||||
struct {
|
struct {
|
||||||
int debian;
|
int debian;
|
||||||
time_t t;
|
uint64_t t;
|
||||||
#ifdef HAVE_UNAME
|
#ifdef HAVE_UNAME
|
||||||
struct utsname utsname;
|
struct utsname utsname;
|
||||||
#endif
|
#endif
|
||||||
@ -67,7 +68,7 @@ static void prng_initial_seed(void)
|
|||||||
memset(&seed, 0, sizeof(seed));
|
memset(&seed, 0, sizeof(seed));
|
||||||
|
|
||||||
seed.debian = 4;
|
seed.debian = 4;
|
||||||
seed.t = time(NULL);
|
seed.t = timing_get_time();
|
||||||
#ifdef HAVE_UNAME
|
#ifdef HAVE_UNAME
|
||||||
uname(&seed.utsname);
|
uname(&seed.utsname);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user