瀏覽代碼

Fix build on Windows

Nikias Bassen 4 月之前
父節點
當前提交
3fdaed78de
共有 3 個文件被更改,包括 4 次插入3 次删除
  1. 1 1
      configure.ac
  2. 0 2
      src/libusbmuxd.c
  3. 3 0
      tools/inetcat.c

+ 1 - 1
configure.ac

@@ -69,7 +69,7 @@ AC_TYPE_UINT32_T
 AC_TYPE_UINT8_T
 
 # Checks for library functions.
-AC_CHECK_FUNCS([strcasecmp strdup strerror stpncpy sleep malloc realloc getifaddrs])
+AC_CHECK_FUNCS([strcasecmp strdup strerror stpncpy malloc realloc getifaddrs])
 
 # Check for operating system
 AC_MSG_CHECKING([for platform-specific build settings])

+ 0 - 2
src/libusbmuxd.c

@@ -54,9 +54,7 @@
 #ifdef _WIN32
 #include <winsock2.h>
 #include <windows.h>
-#ifndef HAVE_SLEEP
 #define sleep(x) Sleep(x*1000)
-#endif
 #else
 #include <unistd.h>
 #include <signal.h>

+ 3 - 0
tools/inetcat.c

@@ -37,6 +37,9 @@
 #ifdef _WIN32
 #include <winsock2.h>
 #include <windows.h>
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
 #else
 #include <fcntl.h>
 #include <unistd.h>