LRN: Fix automake deps to allow -j* builds again
[oweals/gnunet.git] / src / util / crypto_random.c
index 75435a5e674c529e71dc72c9c6569ef587b2358b..5928b96ea7bffacdfb2e99c1ef708c00752548c5 100644 (file)
@@ -188,7 +188,7 @@ GNUNET_CRYPTO_random_disable_entropy_gathering ()
  * Process ID of the "find" process that we use for
  * entropy gathering.
  */
-static GNUNET_OS_Process *genproc;
+static struct GNUNET_OS_Process *genproc;
 
 /**
  * Function called by libgcrypt whenever we are
@@ -256,7 +256,6 @@ killfind ()
 
 void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init ()
 {
-  SRANDOM (time (NULL));
   gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
   if (!gcry_check_version (GCRYPT_VERSION))
     {
@@ -271,6 +270,7 @@ void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init ()
 #endif
   gcry_set_progress_handler (&entropy_generator, NULL);
   atexit (&killfind);
+  SRANDOM (time (NULL) ^ GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX));
 }