]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
main: handle thread id for rand seed differently
authorJaroslav Kysela <perex@perex.cz>
Tue, 17 Nov 2015 11:03:39 +0000 (12:03 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 17 Nov 2015 11:03:39 +0000 (12:03 +0100)
src/main.c

index dd8a023e178e61b235863d4be414ef576e95d285..12f9227f383448788062eac5e8fc7563aa92a59d 100644 (file)
@@ -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));