aboutsummaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-13 07:03:03 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-13 07:03:03 +0000
commit115e74a8adef7f8e509b083015fdbf8b453efb1d (patch)
treed0aa1a7a3eb55244cc9d7526f28769ff0453838d /lib/file.c
parent1b26fe39f927fdef18ea0f8451d6f7f5bf76d4d9 (diff)
I made the same fix here, that Tor already did in the ftp.c code. To make
sure this doesn't get weird on 64bit archs.
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/file.c b/lib/file.c
index 2eeb52760..3bfc342d4 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -206,11 +206,12 @@ CURLcode Curl_file(struct connectdata *conn)
#ifdef HAVE_STRFTIME
if(fstated) {
struct tm *tm;
+ time_t clock = (time_t)statbuf.st_mtime;
#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (struct tm *)gmtime_r((time_t *)&statbuf.st_mtime, &buffer);
+ tm = (struct tm *)gmtime_r(&clock, &buffer);
#else
- tm = gmtime((time_t *)&statbuf.st_mtime);
+ tm = gmtime(&clock);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",