From: Dr. Stephen Henson Date: Tue, 14 Apr 2009 15:13:35 +0000 (+0000) Subject: Fix typo and stop WIN32 warnings. X-Git-Tag: OpenSSL_1_0_0-beta2~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=10acacb3bf9f11e21ac7305a01903593ca71536b;p=oweals%2Fopenssl.git Fix typo and stop WIN32 warnings. --- diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 2717d77956..dde0abe05a 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -66,6 +66,10 @@ #include +#ifdef OPENSSL_SYS_WIN32 +#include +#endif + #define IP_MTU 14 /* linux is lame */ #ifdef WATT32 @@ -204,11 +208,12 @@ static int dgram_read(BIO *b, char *out, int outl) { if (data->hstimeout.tv_sec > 0 || data->hstimeout.tv_usec > 0) { + struct timeval curtime; #ifdef OPENSSL_SYS_WIN32 - struct timeb tb; - ftime(&tb); - curtime.tv_sec = tb.time; - curtime.tv_usec = tb.millitm * 1000; + struct _timeb tb; + _ftime(&tb); + curtime.tv_sec = (long)tb.time; + curtime.tv_usec = (long)tb.millitm * 1000; #else gettimeofday(&curtime, NULL); #endif @@ -374,10 +379,10 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) if (num > 0) { #ifdef OPENSSL_SYS_WIN32 - struct timeb tb; - ftime(&tb); - data->hstimeout.tv_sec = tb.time; - data->hstimeout.tv_usec = tb.millitm * 1000; + struct _timeb tb; + _ftime(&tb); + data->hstimeout.tv_sec = (long)tb.time; + data->hstimeout.tv_usec = (long)tb.millitm * 1000; #else gettimeofday(&(data->hstimeout), NULL); #endif