Jelajahi Sumber

Fix build on Windows

Nikias Bassen 4 bulan lalu
induk
melakukan
3fdaed78de
3 mengubah file dengan 4 tambahan dan 3 penghapusan
  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>