]> granicus.if.org Git - strace/commitdiff
Check HAVE_LONG_LONG_OFF_T when printing offset
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 3 Feb 2012 18:12:10 +0000 (10:12 -0800)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 6 Feb 2012 13:33:41 +0000 (13:33 +0000)
When HAVE_LONG_LONG_OFF_T is defined, we need to use %llu to print
offset.

* io.c (sys_sendfile): Check HAVE_LONG_LONG_OFF_T when printing
offset.

io.c

diff --git a/io.c b/io.c
index c3075aa8ac3162b18f50d3bf8147e426bd829918..bc5e110dd1765fcc63d561d014e94e52203262c9 100644 (file)
--- a/io.c
+++ b/io.c
@@ -379,7 +379,11 @@ sys_sendfile(struct tcb *tcp)
                else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
                        tprintf("%#lx", tcp->u_arg[2]);
                else
+#ifdef HAVE_LONG_LONG_OFF_T
+                       tprintf("[%llu]", offset);
+#else
                        tprintf("[%lu]", offset);
+#endif
                tprintf(", %lu", tcp->u_arg[3]);
        }
        return 0;