updates
[silc.git] / lib / silccrypt / silcrng.c
index a52b4eea9efba6cb6b7d7f0fe253918e52aad8c0..7bed81e138e9997fd34e502a42ce24e969f516a4 100644 (file)
 
 #include "silcincludes.h"
 
+#ifndef WIN32
+#ifdef HAVE_GETSID
+extern pid_t getsid (pid_t __pid);
+#endif
+
+#ifdef HAVE_GETPGID
+extern pid_t getpgid (pid_t __pid);
+#endif
+#endif
+
 #undef SILC_RNG_DEBUG
 /*#define SILC_RNG_DEBUG*/
 
@@ -340,7 +350,7 @@ static void silc_rng_exec_command(SilcRng rng, char *command)
   pclose(fd);
   
   /* Add the buffer into random pool */
-  silc_rng_add_noise(rng, buf, strlen(buf));
+  silc_rng_add_noise(rng, buf, i);
   memset(buf, 0, sizeof(buf));
 #endif
 }