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.
---
2012-04-15  H.J. Lu  <[email protected]>

        * resource.c (sys_times): Cast clock_t type to unsigned long
        * signal.c (printsiginfo): Likewise.

---
 resource.c    |    6 ++++--
 signal.c      |    4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)
 create mode 100644 ChangeLog.hjl

diff --git a/resource.c b/resource.c
index d7a34ef..8464071 100644
--- a/resource.c
+++ b/resource.c
@@ -428,9 +428,11 @@ sys_times(struct tcb *tcp)
                        tprints("{...}");
                else {
                        tprintf("{tms_utime=%lu, tms_stime=%lu, ",
-                               tbuf.tms_utime, tbuf.tms_stime);
+                               (unsigned long) tbuf.tms_utime,
+                               (unsigned long) tbuf.tms_stime);
                        tprintf("tms_cutime=%lu, tms_cstime=%lu}",
-                               tbuf.tms_cutime, tbuf.tms_cstime);
+                               (unsigned long) tbuf.tms_cutime,
+                               (unsigned long) tbuf.tms_cstime);
                }
        }
        return 0;
diff --git a/signal.c b/signal.c
index ab7ae56..ff61360 100644
--- a/signal.c
+++ b/signal.c
@@ -723,8 +723,8 @@ printsiginfo(siginfo_t *sip, int verbose)
                                        tprints(", ...");
                                else
                                        tprintf(", si_utime=%lu, si_stime=%lu",
-                                               sip->si_utime,
-                                               sip->si_stime);
+                                               (unsigned long) sip->si_utime,
+                                               (unsigned long) sip->si_stime);
                                break;
                        case SIGILL: case SIGFPE:
                        case SIGSEGV: case SIGBUS:
-- 
1.7.6.5


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to