From 852cff043b6f6561beb8021f3e8a05a327482d9a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 21 Jul 2016 14:05:29 +0200 Subject: [PATCH] fix monotime test mocking on 32-bit systems --- src/common/compat_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/compat_time.c b/src/common/compat_time.c index 52abfeba21..58916825cb 100644 --- a/src/common/compat_time.c +++ b/src/common/compat_time.c @@ -331,8 +331,8 @@ monotime_get(monotime_t *out) { #ifdef TOR_UNIT_TESTS if (monotime_mocking_enabled) { - out->ts_.tv_sec = mock_time_nsec / ONE_BILLION; - out->ts_.tv_nsec = mock_time_nsec % ONE_BILLION; + out->ts_.tv_sec = (time_t) (mock_time_nsec / ONE_BILLION); + out->ts_.tv_nsec = (int) (mock_time_nsec % ONE_BILLION); return; } #endif