diff --git a/include/libssh/priv.h b/include/libssh/priv.h index ad932d2f..bab761b0 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -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 diff --git a/src/misc.c b/src/misc.c index 81b23f25..e6264101 100644 --- a/src/misc.c +++ b/src/misc.c @@ -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 */