diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-02-13 06:59:49 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-02-13 06:59:49 +0000 |
commit | 1b26fe39f927fdef18ea0f8451d6f7f5bf76d4d9 (patch) | |
tree | faa883cb66f965840c1be0d0a0305919564a89f0 | |
parent | 4674f3f115fdff6c4c24f1c941ddc2944d43aecb (diff) |
Tor Arntsen's fix for the bad (64bit wise) typecast when using gmtime()
-rw-r--r-- | lib/ftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2238,11 +2238,12 @@ CURLcode ftp_perform(struct connectdata *conn, #ifdef HAVE_STRFTIME if(data->set.get_filetime && (data->info.filetime>=0) ) { struct tm *tm; + time_t clock = (time_t)data->info.filetime; #ifdef HAVE_GMTIME_R struct tm buffer; - tm = (struct tm *)gmtime_r((time_t *)&data->info.filetime, &buffer); + tm = (struct tm *)gmtime_r(&clock, &buffer); #else - tm = gmtime((time_t *)&data->info.filetime); + tm = gmtime(&clock); #endif /* format: "Tue, 15 Nov 1994 12:45:26" */ strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n", |