aboutsummaryrefslogtreecommitdiff
path: root/passgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'passgen.c')
-rw-r--r--passgen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/passgen.c b/passgen.c
index af51d4f..cf9fb89 100644
--- a/passgen.c
+++ b/passgen.c
@@ -4,15 +4,18 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
-#include <unistd.h>
+/* getentropy() vs rand()+time()+getpid() */
#if defined (__linux__) || defined (__APPLE__)
#include <sys/random.h>
#else
#include <time.h>
+/* getpid() on Windows */
#if defined (_WIN32) && ! defined (__MINGW32__)
#include <io.h>
+#else
+#include <unistd.h>
#endif
#endif