]> PatchyGit - patchyircd.git/commitdiff
passwd.c: fix compilation on windows
authorEgor <egor@patchysicp.xyz>
Wed, 31 Jan 2024 19:07:48 +0000 (21:07 +0200)
committerEgor <egor@patchysicp.xyz>
Wed, 31 Jan 2024 19:07:48 +0000 (21:07 +0200)
src/passwd.c

index aa81a0d..ed0bf06 100644 (file)
@@ -1,3 +1,6 @@
+#include <stdio.h>
+#include <string.h>
+#include "netsock.h"
 #ifdef _WIN32
 const char *password_hash(const char *pw)
 {
@@ -20,11 +23,8 @@ int password_check(const char *key, const char *pw, const char *fn)
        return -1;
 }
 #else
-#include <stdio.h>
-#include <string.h>
 #include <unistd.h>
 #include <crypt.h>
-#include "netsock.h"
 const char *password_hash(const char *pw)
 {
        char salt[20];