From 06240b91a61e2d2df6e3a5a3ca65f25244729a11 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Fri, 24 Jan 2014 14:46:05 +0200 Subject: [PATCH] cross-compile: comment out sleep(). Reported as unneded: https://github.com/veox/sgminer/issues/37 When is this true? Which IDEs, Windows/MinGW versions? --- compat.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/compat.h b/compat.h index ed18baa5..08d0dcec 100644 --- a/compat.h +++ b/compat.h @@ -47,15 +47,16 @@ static inline int nanosleep(const struct timespec *req, struct timespec *rem) } #endif -static inline int sleep(unsigned int secs) -{ - struct timespec req, rem; - req.tv_sec = secs; - req.tv_nsec = 0; - if (!nanosleep(&req, &rem)) - return 0; - return rem.tv_sec + (rem.tv_nsec ? 1 : 0); -} +/* Reported unneded in https://github.com/veox/sgminer/issues/37 */ +/* static inline int sleep(unsigned int secs) */ +/* { */ +/* struct timespec req, rem; */ +/* req.tv_sec = secs; */ +/* req.tv_nsec = 0; */ +/* if (!nanosleep(&req, &rem)) */ +/* return 0; */ +/* return rem.tv_sec + (rem.tv_nsec ? 1 : 0); */ +/* } */ enum { PRIO_PROCESS = 0,