Browse Source

Merge commit 'cd61807' into bfgminer-3.5.x

Luke Dashjr 12 years ago
parent
commit
a8f7788f28
2 changed files with 5 additions and 1 deletions
  1. 3 1
      compat.h
  2. 2 0
      configure.ac

+ 3 - 1
compat.h

@@ -123,7 +123,7 @@ static inline int nanosleep(const struct timespec *req, struct timespec *rem)
 #undef cgtime
 #endif
 
-#ifdef WIN32
+#ifndef HAVE_SLEEP
 static inline int sleep(unsigned int secs)
 {
 	struct timespec req, rem;
@@ -133,7 +133,9 @@ static inline int sleep(unsigned int secs)
 		return 0;
 	return rem.tv_sec + (rem.tv_nsec ? 1 : 0);
 }
+#endif
 
+#ifdef WIN32
 enum {
 	PRIO_PROCESS		= 0,
 };

+ 2 - 0
configure.ac

@@ -103,6 +103,8 @@ AC_CHECK_HEADERS([pwd.h])
 # Check for chroot support
 AC_CHECK_FUNCS([chroot])
 
+AC_CHECK_FUNCS([sleep])
+
 AC_FUNC_ALLOCA
 
 driverlist=