From 9d5eb631e3db34ae7e62fcbded203ca7755fef2d Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 21 Jul 2015 12:52:29 -0600 Subject: [PATCH] move sleep shim to posix_win.c --- crypto/compat/posix_win.c | 7 +++++++ include/compat/unistd.h | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c index f8a46ab..0dcc046 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c @@ -189,4 +189,11 @@ int gettimeofday(struct timeval * tp, struct timezone * tzp) tp->tv_usec = (long)(system_time.wMilliseconds * 1000); return 0; } + +unsigned int sleep(unsigned int seconds) +{ + Sleep(seconds * 1000); + return seconds; +} + #endif diff --git a/include/compat/unistd.h b/include/compat/unistd.h index 4676dc8..5dc2908 100644 --- a/include/compat/unistd.h +++ b/include/compat/unistd.h @@ -21,11 +21,7 @@ #define access _access -static inline unsigned int sleep(unsigned int seconds) -{ - Sleep(seconds * 1000); - return seconds; -} +unsigned int sleep(unsigned int seconds); #endif