From aaf7e68c75a907c3c08e83dfd2972665a0f1c1a3 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 1 Mar 2020 21:55:17 +0100 Subject: Fix printf format specifies for sqfs_u64 Signed-off-by: David Oberhollenzer --- include/compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/compat.h') diff --git a/include/compat.h b/include/compat.h index 5f73158..b67d27f 100644 --- a/include/compat.h +++ b/include/compat.h @@ -31,6 +31,15 @@ # error I do not know how to trap integer overflows with this compiler #endif +#if defined(_WIN32) || defined(__WINDOWS__) +# define PRI_U64 "%I64u" +# define PRI_U32 "%I32u" +#else +# include +# define PRI_U64 PRIu64 +# define PRI_U32 PRIu32 +#endif + #if SIZEOF_SIZE_T <= SIZEOF_INT # define PRI_SZ "%u" #elif SIZEOF_SIZE_T == SIZEOF_LONG -- cgit v1.2.3