Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
main: handle thread id for rand seed differently
  • Loading branch information
perexg committed Nov 17, 2015
1 parent 197f454 commit cf47a5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit cf47a5d

Please sign in to comment.