Initial support for Windows
[awesomized/libmemcached] / tests / server.c
index c0521e5bb26d5dabc1d615d82048b2c8fb8bd1ec..f2717795af0af04c2d5f46960a8f0f6a861e0278 100644 (file)
@@ -26,7 +26,7 @@
 #include <libmemcached/memcached.h>
 #include <libmemcached/util.h>
 #include <unistd.h>
-#include <time.h>
+#include <sys/time.h>
 
 #include "server.h"
 
@@ -110,9 +110,10 @@ void server_startup(server_startup_st *construct)
           file= fopen(buffer, "r");
           if (file == NULL)
           {
+#ifndef WIN32
             struct timespec req= { .tv_sec= 0, .tv_nsec= 5000 };
             nanosleep(&req, NULL);
-
+#endif
             continue;
           }
           char *found= fgets(buffer, sizeof(buffer), file);