]> granicus.if.org Git - strace/commitdiff
mips64: fix PRI__64 macro definition when compiled for Android
authorLazar Trsic <Lazar.Trsic@imgtec.com>
Mon, 10 Jul 2017 15:05:44 +0000 (17:05 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 13 Jul 2017 21:15:21 +0000 (21:15 +0000)
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".

defs.h

diff --git a/defs.h b/defs.h
index 21f1704e0cd735859262581fcdbc10bafd8802ae..bb0dad3bf2b308de2cc83a64735bc8ed2d8b9614 100644 (file)
--- 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"