diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-06-02 19:48:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-06-02 19:48:29 +0000 |
commit | b084dc87600e8f1ab8a583f7f6b52b5c332d91b3 (patch) | |
tree | 37ef913082cc6483fbf0d69042f743b5f5f9d918 /ares/ares_timeout.c | |
parent | 2ae9536d324163b308c2f18f7d054d49f92d242a (diff) | |
download | curl-b084dc87600e8f1ab8a583f7f6b52b5c332d91b3.tar.gz |
Brad House fixed VS2005 compiler warnings due to time_t being 64bit.
He also made recent Microsoft compilers use _strdup() instead of strdup().
Diffstat (limited to 'ares/ares_timeout.c')
-rw-r--r-- | ares/ares_timeout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ares/ares_timeout.c b/ares/ares_timeout.c index fa5ae0187..496db8459 100644 --- a/ares/ares_timeout.c +++ b/ares/ares_timeout.c @@ -31,7 +31,8 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, { struct query *query; time_t now; - int offset, min_offset; + time_t offset, min_offset; /* these use time_t since some 32 bit systems + still use 64 bit time_t! (like VS2005) */ /* No queries, no timeout (and no fetch of the current time). */ if (!channel->queries) @@ -57,7 +58,7 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, */ if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec)) { - tvbuf->tv_sec = min_offset; + tvbuf->tv_sec = (long)min_offset; tvbuf->tv_usec = 0; return tvbuf; } |