X-Git-Url: https://git.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fdropin.c;h=1bad05cd43e6fee4c88937f0a69577741819aca6;hb=95d8811c2cef8bcde78e1f172f6c57c25cd487aa;hp=52fb5b8675bd3799eb8177e0df7222f4ecd5edbf;hpb=965710e7337523fc8605310d74c6f9240d76e7ce;p=tinc diff --git a/src/dropin.c b/src/dropin.c index 52fb5b86..1bad05cd 100644 --- a/src/dropin.c +++ b/src/dropin.c @@ -164,9 +164,10 @@ int gettimeofday(struct timeval *tv, void *tz) { } #endif -#ifdef HAVE_MINGW +#ifndef HAVE_USLEEP int usleep(long usec) { - Sleep(usec / 1000); + struct timeval tv = {usec / 1000000, (usec / 1000) % 1000}; + select(0, NULL, NULL, NULL, &tv); return 0; } #endif