From 98a096134b23be980a0aa56e775c5510f0e93595 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 18 Sep 2016 16:24:14 +0200 Subject: idevicebackup2: Fix build on win32 after last commit --- tools/idevicebackup2.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tools/idevicebackup2.c') 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; -- cgit v1.1-32-gdbae