summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-02-12 21:19:07 +0100
committerGravatar Nikias Bassen2012-02-12 21:19:07 +0100
commit224fb3cc76a4b0249158ebe2ec78b823500dd420 (patch)
tree6cee846122ab35afcd6b7177cb4af4999c90ba3d
parent23abb2405f3401690fef892425afbb364bef3b93 (diff)
downloadidevicerestore-224fb3cc76a4b0249158ebe2ec78b823500dd420.tar.gz
idevicerestore-224fb3cc76a4b0249158ebe2ec78b823500dd420.tar.bz2
win32: use #ifndef to prevent warning about sleep being already defined
-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