summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/common.h2
-rw-r--r--src/libirecovery.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 938d14c..1ffe3bd 100644
--- a/src/common.h
+++ b/src/common.h
@@ -191,7 +191,9 @@ char *generate_guid();
#include <windows.h>
#define __mkdir(path, mode) mkdir(path)
#define FMT_qu "%I64u"
+#ifndef sleep
#define sleep(x) Sleep(x*1000)
+#endif
#else
#define __mkdir(path, mode) mkdir(path, mode)
#define FMT_qu "%qu"
diff --git a/src/libirecovery.h b/src/libirecovery.h
index 0af73e6..84d8681 100644
--- a/src/libirecovery.h
+++ b/src/libirecovery.h
@@ -30,8 +30,10 @@ extern "C" {
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef interface
+#ifndef sleep
#define sleep(n) Sleep(1000 * n)
#endif
+#endif
#define APPLE_VENDOR_ID 0x05AC