diff options
| author | 2011-10-05 21:09:14 +0200 | |
|---|---|---|
| committer | 2012-03-19 01:44:59 +0100 | |
| commit | 1b9d972de6625d97dec8516def6c3eaac9a87cb3 (patch) | |
| tree | 982e19f01c58d3e527cc3d0c033130d7868895ca /tools | |
| parent | 90a4d980e645098d70f193581b55081b0686928c (diff) | |
| download | libimobiledevice-1b9d972de6625d97dec8516def6c3eaac9a87cb3.tar.gz libimobiledevice-1b9d972de6625d97dec8516def6c3eaac9a87cb3.tar.bz2 | |
tools: win32 build fixes
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicebackup.c | 8 | ||||
| -rw-r--r-- | tools/idevicebackup2.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 25f8014..d6d9228 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c | |||
| @@ -48,6 +48,10 @@ | |||
| 48 | #define LOCK_ATTEMPTS 50 | 48 | #define LOCK_ATTEMPTS 50 |
| 49 | #define LOCK_WAIT 200000 | 49 | #define LOCK_WAIT 200000 |
| 50 | 50 | ||
| 51 | #ifdef WIN32 | ||
| 52 | #define sleep(x) Sleep(x*1000) | ||
| 53 | #endif | ||
| 54 | |||
| 51 | static mobilebackup_client_t mobilebackup = NULL; | 55 | static mobilebackup_client_t mobilebackup = NULL; |
| 52 | static lockdownd_client_t client = NULL; | 56 | static lockdownd_client_t client = NULL; |
| 53 | static idevice_t phone = NULL; | 57 | static idevice_t phone = NULL; |
| @@ -831,9 +835,11 @@ int main(int argc, char *argv[]) | |||
| 831 | 835 | ||
| 832 | /* we need to exit cleanly on running backups and restores or we cause havok */ | 836 | /* we need to exit cleanly on running backups and restores or we cause havok */ |
| 833 | signal(SIGINT, clean_exit); | 837 | signal(SIGINT, clean_exit); |
| 834 | signal(SIGQUIT, clean_exit); | ||
| 835 | signal(SIGTERM, clean_exit); | 838 | signal(SIGTERM, clean_exit); |
| 839 | #ifndef WIN32 | ||
| 840 | signal(SIGQUIT, clean_exit); | ||
| 836 | signal(SIGPIPE, SIG_IGN); | 841 | signal(SIGPIPE, SIG_IGN); |
| 842 | #endif | ||
| 837 | 843 | ||
| 838 | /* parse cmdline args */ | 844 | /* parse cmdline args */ |
| 839 | for (i = 1; i < argc; i++) { | 845 | for (i = 1; i < argc; i++) { |
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 @@ | |||
| 43 | #define LOCK_ATTEMPTS 50 | 43 | #define LOCK_ATTEMPTS 50 |
| 44 | #define LOCK_WAIT 200000 | 44 | #define LOCK_WAIT 200000 |
| 45 | 45 | ||
| 46 | #ifdef WIN32 | ||
| 47 | #define sleep(x) Sleep(x*1000) | ||
| 48 | #endif | ||
| 49 | |||
| 46 | #define CODE_SUCCESS 0x00 | 50 | #define CODE_SUCCESS 0x00 |
| 47 | #define CODE_ERROR_LOCAL 0x06 | 51 | #define CODE_ERROR_LOCAL 0x06 |
| 48 | #define CODE_ERROR_REMOTE 0x0b | 52 | #define CODE_ERROR_REMOTE 0x0b |
| @@ -1181,9 +1185,11 @@ int main(int argc, char *argv[]) | |||
| 1181 | 1185 | ||
| 1182 | /* we need to exit cleanly on running backups and restores or we cause havok */ | 1186 | /* we need to exit cleanly on running backups and restores or we cause havok */ |
| 1183 | signal(SIGINT, clean_exit); | 1187 | signal(SIGINT, clean_exit); |
| 1184 | signal(SIGQUIT, clean_exit); | ||
| 1185 | signal(SIGTERM, clean_exit); | 1188 | signal(SIGTERM, clean_exit); |
| 1189 | #ifndef WIN32 | ||
| 1190 | signal(SIGQUIT, clean_exit); | ||
| 1186 | signal(SIGPIPE, SIG_IGN); | 1191 | signal(SIGPIPE, SIG_IGN); |
| 1192 | #endif | ||
| 1187 | 1193 | ||
| 1188 | /* parse cmdline args */ | 1194 | /* parse cmdline args */ |
| 1189 | for (i = 1; i < argc; i++) { | 1195 | for (i = 1; i < argc; i++) { |
