mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
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.
This commit is contained in:
parent
1b26fe39f9
commit
115e74a8ad
@ -206,11 +206,12 @@ CURLcode Curl_file(struct connectdata *conn)
|
|||||||
#ifdef HAVE_STRFTIME
|
#ifdef HAVE_STRFTIME
|
||||||
if(fstated) {
|
if(fstated) {
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
|
time_t clock = (time_t)statbuf.st_mtime;
|
||||||
#ifdef HAVE_GMTIME_R
|
#ifdef HAVE_GMTIME_R
|
||||||
struct tm buffer;
|
struct tm buffer;
|
||||||
tm = (struct tm *)gmtime_r((time_t *)&statbuf.st_mtime, &buffer);
|
tm = (struct tm *)gmtime_r(&clock, &buffer);
|
||||||
#else
|
#else
|
||||||
tm = gmtime((time_t *)&statbuf.st_mtime);
|
tm = gmtime(&clock);
|
||||||
#endif
|
#endif
|
||||||
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
|
/* 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",
|
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user