Commit 352bab2109d491639b9571211b6f59ddeda0e304

Jeff Garzik 2010-11-26T15:50:36

Introduce compat.h, for Win32 builds

diff --git a/compat.h b/compat.h
new file mode 100644
index 0000000..a318991
--- /dev/null
+++ b/compat.h
@@ -0,0 +1,15 @@
+#ifndef __COMPAT_H__
+#define __COMPAT_H__
+
+#ifdef WIN32
+
+#include <windows.h>
+
+static inline void sleep(int secs)
+{
+	Sleep(secs * 1000);
+}
+
+#endif /* WIN32 */
+
+#endif /* __COMPAT_H__ */
diff --git a/cpu-miner.c b/cpu-miner.c
index 05b5a9a..f1eacf7 100644
--- a/cpu-miner.c
+++ b/cpu-miner.c
@@ -20,6 +20,7 @@
 #include <pthread.h>
 #include <getopt.h>
 #include <jansson.h>
+#include "compat.h"
 #include "miner.h"
 
 #define PROGRAM_NAME		"minerd"