From: Jaroslav Kysela Date: Tue, 17 Nov 2015 11:03:39 +0000 (+0100) Subject: main: handle thread id for rand seed differently X-Git-Tag: v4.2.1~1533 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf47a5dcb54b833ba708a6f4f9e4db2f44643111;p=thirdparty%2Ftvheadend.git main: handle thread id for rand seed differently --- 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));