From: Lazar Trsic Date: Mon, 10 Jul 2017 15:05:44 +0000 (+0200) Subject: mips64: fix PRI__64 macro definition when compiled for Android X-Git-Tag: v4.19~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c34fd9162419552fe88862c0035fba534714b5b;p=strace mips64: fix PRI__64 macro definition when compiled for Android By default for MIPS64 in Android __u64 type is exported as unsigned long long. This caused compilation -Wformat warnings and would break the build if -Werror is used. * defs.h [SIZEOF_LONG != 4 && MIPS && __ANDROID__] (PRI__64): Change from "l" to "ll". --- diff --git a/defs.h b/defs.h index 21f1704e..bb0dad3b 100644 --- a/defs.h +++ b/defs.h @@ -1041,10 +1041,12 @@ scno_is_valid(kernel_ulong_t scno) * kernel-userspace ABI and now must be maintained forever. This matches * what the kernel exports for each architecture so we don't need to cast * every printing of __u64 or __s64 to stdint types. + * The exception is Android, where for MIPS64 unsigned long long is used. */ #if SIZEOF_LONG == 4 # define PRI__64 "ll" -#elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +#elif defined ALPHA || defined IA64 || defined POWERPC \ + || (defined MIPS && !defined __ANDROID__) # define PRI__64 "l" #else # define PRI__64 "ll"