Skip to content

Commit 3763a6b

Browse files
authored
Revert "Fix for Y2038 gettimeofday for Win32 builds (#738)"
This reverts commit 31f8d13.
1 parent 31f8d13 commit 3763a6b

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

contrib/win32/win32compat/inc/sys/time.h

-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
#pragma once
21
#include <sys\utime.h>
32

43
#define utimbuf _utimbuf
54
#define utimes w32_utimes
65

7-
#define timeval w32_timeval
8-
struct timeval
9-
{
10-
long long tv_sec;
11-
long tv_usec;
12-
};
13-
146
int usleep(unsigned int);
157
int gettimeofday(struct timeval *, void *);
168
int nanosleep(const struct timespec *, struct timespec *);

contrib/win32/win32compat/misc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ gettimeofday(struct timeval *tv, void *tz)
207207
us = (timehelper.ns - EPOCH_DELTA) / 10;
208208

209209
/* Stuff result into the timeval */
210-
tv->tv_sec = (long long)(us / USEC_IN_SEC);
210+
tv->tv_sec = (long)(us / USEC_IN_SEC);
211211
tv->tv_usec = (long)(us % USEC_IN_SEC);
212212

213213
return 0;

0 commit comments

Comments
 (0)