summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2016-09-18 16:24:14 +0200
committerGravatar Nikias Bassen2016-09-18 16:24:14 +0200
commit98a096134b23be980a0aa56e775c5510f0e93595 (patch)
tree124ee9406bcf157e8307fadea04ac73da195572a /tools
parent6aecc7228dbb30b4db48374ffb4ae4a1616bdd95 (diff)
downloadlibimobiledevice-98a096134b23be980a0aa56e775c5510f0e93595.tar.gz
libimobiledevice-98a096134b23be980a0aa56e775c5510f0e93595.tar.bz2
idevicebackup2: Fix build on win32 after last commit
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup2.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index c822d7f..3b2c0af 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -192,6 +192,20 @@ static int mkdir_with_parents(const char *dir, int mode)
return res;
}
+#ifdef WIN32
+static int win32err_to_errno(int err_value)
+{
+ switch (err_value) {
+ case ERROR_FILE_NOT_FOUND:
+ return ENOENT;
+ case ERROR_ALREADY_EXISTS:
+ return EEXIST;
+ default:
+ return EFAULT;
+ }
+}
+#endif
+
static int remove_file(const char* path)
{
int e = 0;
@@ -518,20 +532,6 @@ static int errno_to_device_error(int errno_value)
}
}
-#ifdef WIN32
-static int win32err_to_errno(int err_value)
-{
- switch (err_value) {
- case ERROR_FILE_NOT_FOUND:
- return ENOENT;
- case ERROR_ALREADY_EXISTS:
- return EEXIST;
- default:
- return EFAULT;
- }
-}
-#endif
-
static int mb2_handle_send_file(mobilebackup2_client_t mobilebackup2, const char *backup_dir, const char *path, plist_t *errplist)
{
uint32_t nlen = 0;