summaryrefslogtreecommitdiff
path: root/package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch')
-rw-r--r--package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch b/package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch
new file mode 100644
index 000000000..c2a4dd295
--- /dev/null
+++ b/package/lttng-libust/lttng-libust-fix-overflow-32-bits.patch
@@ -0,0 +1,26 @@
+From dc190cc1f8ddccfa7b0b8323ed157afb29a0ebb7 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Wed, 21 Dec 2011 16:24:48 -0500
+Subject: [PATCH] Fix clock source overflow on 32-bit archs
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ liblttng-ust/clock.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/liblttng-ust/clock.h b/liblttng-ust/clock.h
+index b5d3e77..23294d2 100644
+--- a/liblttng-ust/clock.h
++++ b/liblttng-ust/clock.h
+@@ -39,7 +39,7 @@ static __inline__ uint64_t trace_clock_read64(void)
+ struct timespec ts;
+
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+- return (ts.tv_sec * 1000000000) + ts.tv_nsec;
++ return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
+ }
+
+ static __inline__ uint32_t trace_clock_freq_scale(void)
+--
+1.7.2.5
+