Explorar o código

Fix compile failures on tor_gettimeofday() fix for windows

svn:r4685
Nick Mathewson %!s(int64=19) %!d(string=hai) anos
pai
achega
98f1265309
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/common/compat.c

+ 2 - 2
src/common/compat.c

@@ -838,8 +838,8 @@ tor_gettimeofday(struct timeval *timeval)
     exit(1);
   }
   ft.ft_64 -= EPOCH_BIAS;
-  tv->tv_sec = ft.ft_64 / UNITS_PER_SEC;
-  tv->tv_usec = (ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC;
+  timeval->tv_sec = (unsigned) (ft.ft_64 / UNITS_PER_SEC);
+  timeval->tv_usec = (unsigned) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC);
 #elif defined(HAVE_GETTIMEOFDAY)
   if (gettimeofday(timeval, NULL)) {
     log_fn(LOG_ERR, "gettimeofday failed.");