From: H.J. L. <hon...@in...> - 2012-04-16 14:40:25
|
On Sun, Apr 15, 2012 at 11:17:13AM -0700, H.J. Lu wrote: > > Hi, > > Linux kernel v3.4 adds x32 support whose clock_t is long long. This > patch casts clock_t type to unsigned long for "%lu". > > H.J. > --- > Here is a patch to case clock_t type to unsigned long long. Thanks. H.J. --- 2012-04-16 H.J. Lu <hon...@in...> * resource.c (sys_times): Cast clock_t type to unsigned long long. diff --git a/resource.c b/resource.c index d7a34ef..f0e2992 100644 --- a/resource.c +++ b/resource.c @@ -427,10 +427,12 @@ sys_times(struct tcb *tcp) else if (umove(tcp, tcp->u_arg[0], &tbuf) < 0) tprints("{...}"); else { - tprintf("{tms_utime=%lu, tms_stime=%lu, ", - tbuf.tms_utime, tbuf.tms_stime); - tprintf("tms_cutime=%lu, tms_cstime=%lu}", - tbuf.tms_cutime, tbuf.tms_cstime); + tprintf("{tms_utime=%llu, tms_stime=%llu, ", + (unsigned long long) tbuf.tms_utime, + (unsigned long long) tbuf.tms_stime); + tprintf("tms_cutime=%llu, tms_cstime=%llu}", + (unsigned long long) tbuf.tms_cutime, + (unsigned long long) tbuf.tms_cstime); } } return 0; |