lttng-libust-fix-overflow-32-bits.patch 838 B

1234567891011121314151617181920212223242526
  1. From dc190cc1f8ddccfa7b0b8323ed157afb29a0ebb7 Mon Sep 17 00:00:00 2001
  2. From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  3. Date: Wed, 21 Dec 2011 16:24:48 -0500
  4. Subject: [PATCH] Fix clock source overflow on 32-bit archs
  5. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  6. ---
  7. liblttng-ust/clock.h | 2 +-
  8. 1 files changed, 1 insertions(+), 1 deletions(-)
  9. diff --git a/liblttng-ust/clock.h b/liblttng-ust/clock.h
  10. index b5d3e77..23294d2 100644
  11. --- a/liblttng-ust/clock.h
  12. +++ b/liblttng-ust/clock.h
  13. @@ -39,7 +39,7 @@ static __inline__ uint64_t trace_clock_read64(void)
  14. struct timespec ts;
  15. clock_gettime(CLOCK_MONOTONIC, &ts);
  16. - return (ts.tv_sec * 1000000000) + ts.tv_nsec;
  17. + return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
  18. }
  19. static __inline__ uint32_t trace_clock_freq_scale(void)
  20. --
  21. 1.7.2.5