summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-08-27 17:00:54 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-08-27 17:00:54 +0200
commitdb858277cf844bd577fe73d43d0c73db7b72950d (patch)
tree9f51cb556c3957a52f610abdda4bba267985aa0c
parent87929a9a2168b1634be69fbdcf97d1a41167de6a (diff)
compat/timer: fix integer literal type suffixes
-rw-r--r--compat/timer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/compat/timer.cpp b/compat/timer.cpp
index dcf3f430..15e9d8a4 100644
--- a/compat/timer.cpp
+++ b/compat/timer.cpp
@@ -85,8 +85,8 @@ static void otr_clock_gettime(timespec* ts)
using t_s = decltype(ts->tv_sec);
using t_ns = decltype(ts->tv_nsec);
- ts->tv_sec = t_s(part / 1000000000);
- ts->tv_nsec = t_ns(part % 1000000000);
+ ts->tv_sec = t_s(part / 1000000000LL);
+ ts->tv_nsec = t_ns(part % 1000000000LL);
}
#elif defined __MACH__
@@ -106,8 +106,8 @@ static void otr_clock_gettime(timespec* ts)
uint64_t state, nsec;
state = mach_absolute_time();
nsec = state * timebase_info.numer / timebase_info.denom;
- ts->tv_sec = nsec / 1000000000L;
- ts->tv_nsec = nsec % 1000000000L;
+ ts->tv_sec = nsec / 1000000000UL;
+ ts->tv_nsec = nsec % 1000000000UL;
}
#endif