Update Windows code to fix build breakage
[fio.git] / os / windows / posix.c
index 49bce43955465ca23483660005da8c2770489a5c..8153b455a8ff75a3ff1bde544d6b283312abc781 100755 (executable)
@@ -12,6 +12,7 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <pthread.h>
+#include <time.h>
 #include <semaphore.h>
 #include <sys/shm.h>
 #include <sys/mman.h>
@@ -872,6 +873,14 @@ uid_t geteuid(void)
        return -1;
 }
 
+in_addr_t inet_network(const char *cp)
+{
+       in_addr_t hbo;
+       in_addr_t nbo = inet_addr(cp);
+       hbo = ((nbo & 0xFF) << 24) + ((nbo & 0xFF00) << 8) + ((nbo & 0xFF0000) >> 8) + ((nbo & 0xFF000000) >> 24);
+       return hbo;
+}
+
 const char* inet_ntop(int af, const void *restrict src,
                char *restrict dst, socklen_t size)
 {