aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.h15
-rw-r--r--cpu-miner.c1
2 files changed, 16 insertions, 0 deletions
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"