]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
microblaze: Fix printf size_t format related warnings (again...)
authorVasili Galka <vvv444@gmail.com>
Tue, 26 Aug 2014 10:45:34 +0000 (13:45 +0300)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 9 Sep 2014 07:58:36 +0000 (09:58 +0200)
The basic idea: Define size_t using the __SIZE_TYPE__ compiler-defined
type.

For detailed explanation see similar patch for the nios2 arch:
"nios2: Fix printf size_t format related warnings (again...)"
(sha1: 00a2517fcb5159ed016b25130184638b1dbf2f02)

Signed-off-by: Vasili Galka <vvv444@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/include/asm/posix_types.h

index 38dc5aa85db5104a38323987b0fc56bb818ada8d..ccc6235c8d9faf10e8b5c4a10c4d70ed7d331975 100644 (file)
@@ -27,7 +27,11 @@ typedef int          __kernel_pid_t;
 typedef unsigned short __kernel_ipc_pid_t;
 typedef unsigned int   __kernel_uid_t;
 typedef unsigned int   __kernel_gid_t;
+#ifdef __GNUC__
+typedef __SIZE_TYPE__  __kernel_size_t;
+#else
 typedef unsigned int   __kernel_size_t;
+#endif
 typedef int            __kernel_ssize_t;
 typedef int            __kernel_ptrdiff_t;
 typedef long           __kernel_time_t;