1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

misc: rename gettimeofday symbol

mingw does have this function, even though it appears to be deprecated.
So the symbol has to have a different name, or linking becomes
impossible.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Timo Rothenpieler
2022-08-20 16:00:15 +02:00
committed by Jakub Jelen
parent 6e2648af6b
commit 17aec429f5
2 changed files with 4 additions and 2 deletions

View File

@@ -152,7 +152,9 @@ char *strndup(const char *s, size_t n);
# endif /* _MSC_VER */
struct timeval;
int gettimeofday(struct timeval *__p, void *__t);
int ssh_gettimeofday(struct timeval *__p, void *__t);
#define gettimeofday ssh_gettimeofday
#define _XCLOSESOCKET closesocket

View File

@@ -160,7 +160,7 @@ int ssh_dir_writeable(const char *path)
#define SSH_USEC_IN_SEC 1000000LL
#define SSH_SECONDS_SINCE_1601 11644473600LL
int gettimeofday(struct timeval *__p, void *__t)
int ssh_gettimeofday(struct timeval *__p, void *__t)
{
union {
unsigned long long ns100; /* time since 1 Jan 1601 in 100ns units */