Browse Source

cross-compile: comment out sleep().

Reported as unneded:
https://github.com/veox/sgminer/issues/37

When is this true? Which IDEs, Windows/MinGW versions?
nfactor-troky
Noel Maersk 11 years ago
parent
commit
06240b91a6
  1. 19
      compat.h

19
compat.h

@ -47,15 +47,16 @@ static inline int nanosleep(const struct timespec *req, struct timespec *rem) @@ -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,

Loading…
Cancel
Save