Fix _sleep warning on MinGW
[libftdi] / examples / serial_test.c
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>