summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-10-05 21:09:14 +0200
committerGravatar Martin Szulecki2012-03-19 01:44:59 +0100
commit1b9d972de6625d97dec8516def6c3eaac9a87cb3 (patch)
tree982e19f01c58d3e527cc3d0c033130d7868895ca /tools/idevicebackup2.c
parent90a4d980e645098d70f193581b55081b0686928c (diff)
downloadlibimobiledevice-1b9d972de6625d97dec8516def6c3eaac9a87cb3.tar.gz
libimobiledevice-1b9d972de6625d97dec8516def6c3eaac9a87cb3.tar.bz2
tools: win32 build fixes
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r--tools/idevicebackup2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 6e35abd..57c7865 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -43,6 +43,10 @@
#define LOCK_ATTEMPTS 50
#define LOCK_WAIT 200000
+#ifdef WIN32
+#define sleep(x) Sleep(x*1000)
+#endif
+
#define CODE_SUCCESS 0x00
#define CODE_ERROR_LOCAL 0x06
#define CODE_ERROR_REMOTE 0x0b
@@ -1181,9 +1185,11 @@ int main(int argc, char *argv[])
/* we need to exit cleanly on running backups and restores or we cause havok */
signal(SIGINT, clean_exit);
- signal(SIGQUIT, clean_exit);
signal(SIGTERM, clean_exit);
+#ifndef WIN32
+ signal(SIGQUIT, clean_exit);
signal(SIGPIPE, SIG_IGN);
+#endif
/* parse cmdline args */
for (i = 1; i < argc; i++) {