Explorar el Código

fix monotime test mocking on 32-bit systems

Nick Mathewson hace 8 años
padre
commit
852cff043b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/common/compat_time.c

+ 2 - 2
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