From cf47a5dcb54b833ba708a6f4f9e4db2f44643111 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 17 Nov 2015 12:03:39 +0100 Subject: [PATCH] main: handle thread id for rand seed differently --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index dd8a023e1..12f9227f3 100644 --- a/src/main.c +++ b/src/main.c @@ -593,7 +593,7 @@ main(int argc, char **argv) char buf[512]; FILE *pidfile = NULL; static struct { - pid_t pid; + void *thread_id; struct timeval tv; uint8_t ru[32]; } randseed; @@ -988,7 +988,7 @@ main(int argc, char **argv) SSL_load_error_strings(); SSL_library_init(); /* Rand seed */ - randseed.pid = main_tid; + randseed.thread_id = (void *)main_tid; gettimeofday(&randseed.tv, NULL); uuid_random(randseed.ru, sizeof(randseed.ru)); RAND_seed(&randseed, sizeof(randseed)); -- 2.47.3