summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2012-02-03 10:12:10 -0800
committerDmitry V. Levin <ldv@altlinux.org>2012-02-06 13:33:41 +0000
commit6ca2610cee82e0bc80331093b7a713f6fc593eec (patch)
tree2cb57f44e39bab5e86f7245a142f203d8f108dd6 /io.c
parenta13b3fea4fb57a2f9f56b1caca6eb146c5714fc4 (diff)
downloadstrace-6ca2610cee82e0bc80331093b7a713f6fc593eec.tar.gz
strace-6ca2610cee82e0bc80331093b7a713f6fc593eec.tar.bz2
strace-6ca2610cee82e0bc80331093b7a713f6fc593eec.tar.xz
Check HAVE_LONG_LONG_OFF_T when printing offset
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.
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io.c b/io.c
index c3075aa..bc5e110 100644
--- 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;