summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/debug.c2
-rw-r--r--common/userpref.c2
-rw-r--r--tools/idevicebackup2.c3
-rw-r--r--tools/ideviceimagemounter.c3
-rw-r--r--tools/ideviceinfo.c3
5 files changed, 8 insertions, 5 deletions
diff --git a/common/debug.c b/common/debug.c
index 0bb87a2..67e2fc2 100644
--- a/common/debug.c
+++ b/common/debug.c
@@ -116,7 +116,7 @@ inline void debug_buffer(const char *data, const int length)
fprintf(stderr, " ");
continue;
}
- fprintf(stderr, "%02hhx ", *(data + i + j));
+ fprintf(stderr, "%02x ", *(data + i + j));
}
fprintf(stderr, " | ");
for (j = 0; j < 16; j++) {
diff --git a/common/userpref.c b/common/userpref.c
index 0e774b7..d363b0e 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -102,6 +102,7 @@ static char *userpref_utf16_to_utf8(wchar_t *unistr, long len, long *items_read,
}
#endif
+#ifndef WIN32
static const char *userpref_get_tmp_dir()
{
const char *cdir = getenv("TMPDIR");
@@ -115,6 +116,7 @@ static const char *userpref_get_tmp_dir()
return cdir;
return "/tmp";
}
+#endif
static const char *userpref_get_config_dir()
{
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index a0ffc9b..697e276 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -47,6 +47,7 @@
#ifdef WIN32
#include <windows.h>
+#include <conio.h>
#define sleep(x) Sleep(x*1000)
#else
#include <termios.h>
@@ -1968,7 +1969,6 @@ checkpoint:
char *oldpath = build_path(backup_directory, key, NULL);
#ifdef WIN32
- struct stat st;
if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode))
RemoveDirectory(newpath);
else
@@ -2023,7 +2023,6 @@ checkpoint:
char *newpath = build_path(backup_directory, str, NULL);
free(str);
#ifdef WIN32
- struct stat st;
int res = 0;
if ((stat(newpath, &st) == 0) && S_ISDIR(st.st_mode))
res = RemoveDirectory(newpath);
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c
index e57d83a..09363fd 100644
--- a/tools/ideviceimagemounter.c
+++ b/tools/ideviceimagemounter.c
@@ -29,6 +29,7 @@
#include <libgen.h>
#include <time.h>
#include <sys/time.h>
+#include <inttypes.h>
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
@@ -182,7 +183,7 @@ static void plist_node_to_string(plist_t node)
case PLIST_UINT:
plist_get_uint_val(node, &u);
- printf("%llu\n", (long long)u);
+ printf("%"PRIu64"\n", (long long)u);
break;
case PLIST_REAL:
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index c8d4cac..0c23d3c 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
+#include <inttypes.h>
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
@@ -177,7 +178,7 @@ static void plist_node_to_string(plist_t node)
case PLIST_UINT:
plist_get_uint_val(node, &u);
- printf("%llu\n", (long long)u);
+ printf("%"PRIu64"\n", (long long)u);
break;
case PLIST_REAL: