Fix _sleep warning on MinGW
authorXiaofan Chen <xiaofanc@gmail.com>
Fri, 13 Apr 2012 09:50:36 +0000 (11:50 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 13 Apr 2012 09:50:36 +0000 (11:50 +0200)
examples/bitbang_ft2232.c
examples/serial_test.c

index 41376a9..29f5029 100644 (file)
@@ -12,7 +12,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #ifdef __WIN32__
-#define sleep(x) _sleep(x)
+#define sleep(x) Sleep(x)
 #endif
 #include <ftdi.h>
 
index 20fc772..6a9d8ff 100644 (file)
@@ -8,6 +8,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#ifdef __WIN32__
+#define sleep(x) Sleep(x)
+#endif
 #include <getopt.h>
 #include <signal.h>
 #include <ftdi.h>