From e2e6ec8050274b0a8678d6fc263e7dc4ef66feae Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 13 Nov 2010 15:50:39 +0100 Subject: [PATCH] Provide usleep() for Windows. --- lib/dropin.c | 7 +++++++ lib/dropin.h | 4 ++++ 2 files changed, 11 insertions(+) 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__ */ -- 2.25.1