]> git.meshlink.io Git - meshlink/commitdiff
Provide usleep() for Windows.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 13 Nov 2010 14:50:39 +0000 (15:50 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 13 Nov 2010 14:50:39 +0000 (15:50 +0100)
lib/dropin.c
lib/dropin.h

index 89039da34c024b6427d110cfea15ccee3c08acf9..52fb5b8675bd3799eb8177e0df7222f4ecd5edbf 100644 (file)
@@ -163,3 +163,10 @@ int gettimeofday(struct timeval *tv, void *tz) {
        return 0;
 }
 #endif
+
+#ifdef HAVE_MINGW
+int usleep(long usec) {
+       Sleep(usec / 1000);
+       return 0;
+}
+#endif
index e9d13535fbfb63f55d92e11dd79d4ef36b49386e..d5cf6d2c104de54cc9c9bf42836209fb69a2f713 100644 (file)
@@ -41,4 +41,8 @@ extern int vasprintf(char **, const char *, va_list ap);
 extern int gettimeofday(struct timeval *, void *);
 #endif
 
+#ifdef HAVE_MINGW
+extern int usleep(long);
+#endif
+
 #endif                                                 /* __DROPIN_H__ */