[PATCH 4/7] Check sys_pread64 and sys_pwrite64 only if needed

H.J. Lu hongjiu.lu at intel.com
Fri Feb 3 18:14:07 UTC 2012


Hi,

When HAVE_LONG_LONG_OFF_T is defined, sys_pread64 and sys_pwrite64 won't
be defined.  We shouldn't reference them.

H.J.
---
2012-02-02  H.J. Lu  <hongjiu.lu at intel.com>

	* syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only if
	HAVE_LONG_LONG_OFF_T isn't defined.
 
diff --git a/syscall.c b/syscall.c
index 2575317..2d13aef 100644
--- a/syscall.c
+++ b/syscall.c
@@ -2303,7 +2303,9 @@ dumpio(struct tcb *tcp)
 	if (qual_flags[tcp->u_arg[0]] & QUAL_READ) {
 		if (sysent[tcp->scno].sys_func == sys_read ||
 		    sysent[tcp->scno].sys_func == sys_pread ||
+#ifndef HAVE_LONG_LONG_OFF_T
 		    sysent[tcp->scno].sys_func == sys_pread64 ||
+#endif
 		    sysent[tcp->scno].sys_func == sys_recv ||
 		    sysent[tcp->scno].sys_func == sys_recvfrom)
 			dumpstr(tcp, tcp->u_arg[1], tcp->u_rval);
@@ -2314,7 +2316,9 @@ dumpio(struct tcb *tcp)
 	if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) {
 		if (sysent[tcp->scno].sys_func == sys_write ||
 		    sysent[tcp->scno].sys_func == sys_pwrite ||
+#ifndef HAVE_LONG_LONG_OFF_T
 		    sysent[tcp->scno].sys_func == sys_pwrite64 ||
+#endif
 		    sysent[tcp->scno].sys_func == sys_send ||
 		    sysent[tcp->scno].sys_func == sys_sendto)
 			dumpstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-- 
1.7.6.5





More information about the Strace-devel mailing list