timeval: make timediff_t also work on 32bit windows
authorDaniel Stenberg <daniel@haxx.se>
Thu, 26 Oct 2017 11:02:00 +0000 (13:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 26 Oct 2017 18:22:55 +0000 (20:22 +0200)
... by using curl_off_t for the typedef if time_t is larger than 4
bytes.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/b9d25f9a6b3ca791385b80a6a3c3fa5ae113e1e0#co
mmitcomment-25205058
Closes #2019

lib/timeval.h

index 3821bfb73f3e7183ac4ceff2b6774521b8a9aaae..fb3f680c40740971d8d48f125ab46b0b50270e0c 100644 (file)
@@ -27,7 +27,7 @@
 #if SIZEOF_TIME_T < 8
 typedef int timediff_t;
 #else
-typedef ssize_t timediff_t;
+typedef curl_off_t timediff_t;
 #endif
 
 struct curltime {