From: Guus Sliepen Date: Sat, 13 Nov 2010 14:50:39 +0000 (+0100) Subject: Provide usleep() for Windows. X-Git-Tag: release-1.0.14~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e2e6ec8050274b0a8678d6fc263e7dc4ef66feae;p=oweals%2Ftinc.git Provide usleep() for Windows. --- diff --git a/lib/dropin.c b/lib/dropin.c index 89039da..52fb5b8 100644 --- a/lib/dropin.c +++ b/lib/dropin.c @@ -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 diff --git a/lib/dropin.h b/lib/dropin.h index e9d1353..d5cf6d2 100644 --- a/lib/dropin.h +++ b/lib/dropin.h @@ -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__ */