mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
Fix for Y2038 gettimeofday for Win32 builds (#738)
* Fix for Y2038 gettimeofday for Win32 builds * fixing spaces * Fixing also the builtin gettimeofday
This commit is contained in:
parent
ae72d833fd
commit
31f8d13ab6
@ -1,8 +1,16 @@
|
||||
#pragma once
|
||||
#include <sys\utime.h>
|
||||
|
||||
#define utimbuf _utimbuf
|
||||
#define utimes w32_utimes
|
||||
|
||||
#define timeval w32_timeval
|
||||
struct timeval
|
||||
{
|
||||
long long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
|
||||
int usleep(unsigned int);
|
||||
int gettimeofday(struct timeval *, void *);
|
||||
int nanosleep(const struct timespec *, struct timespec *);
|
||||
|
@ -207,7 +207,7 @@ gettimeofday(struct timeval *tv, void *tz)
|
||||
us = (timehelper.ns - EPOCH_DELTA) / 10;
|
||||
|
||||
/* Stuff result into the timeval */
|
||||
tv->tv_sec = (long)(us / USEC_IN_SEC);
|
||||
tv->tv_sec = (long long)(us / USEC_IN_SEC);
|
||||
tv->tv_usec = (long)(us % USEC_IN_SEC);
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user