aboutsummaryrefslogtreecommitdiff
path: root/passgen.c
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-01-11 17:22:52 +1100
committerNicholas Tay <nick@windblume.net>2022-01-11 17:22:52 +1100
commita15a4c774ec8358ffd74a1bed199fa49cf38ee9c (patch)
treec23a3028131853c65d5d51d23bbe4f820b2dee7f /passgen.c
parent1eefc325594333bd3bc58006acb641a28d465606 (diff)
downloadpassgen-a15a4c774ec8358ffd74a1bed199fa49cf38ee9c.tar.gz
passgen-a15a4c774ec8358ffd74a1bed199fa49cf38ee9c.tar.bz2
passgen-a15a4c774ec8358ffd74a1bed199fa49cf38ee9c.zip
Reorganise/remove unneeded includes
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