mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Don't assume time_t* is compatible with long*.
This commit is contained in:
parent
25585dce47
commit
b91e2353f5
@ -1,3 +1,8 @@
|
|||||||
|
2008-06-24 Micah Cowan <micah@cowan.name>
|
||||||
|
|
||||||
|
* ftp-ls.c (ftp_index): Don't assume time_t* is compatible with
|
||||||
|
long*. Fixes crash on Windows, and probably other systems.
|
||||||
|
|
||||||
2008-06-22 Steven Schubiger <stsc@members.fsf.org>
|
2008-06-22 Steven Schubiger <stsc@members.fsf.org>
|
||||||
|
|
||||||
* http.c: Explicitly initialize and deallocate the message
|
* http.c: Explicitly initialize and deallocate the message
|
||||||
|
@ -894,7 +894,8 @@ ftp_index (const char *file, struct url *u, struct fileinfo *f)
|
|||||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||||
};
|
};
|
||||||
struct tm *ptm = localtime ((time_t *)&f->tstamp);
|
time_t tstamp = f->tstamp;
|
||||||
|
struct tm *ptm = localtime (&tstamp);
|
||||||
|
|
||||||
fprintf (fp, "%d %s %02d ", ptm->tm_year + 1900, months[ptm->tm_mon],
|
fprintf (fp, "%d %s %02d ", ptm->tm_year + 1900, months[ptm->tm_mon],
|
||||||
ptm->tm_mday);
|
ptm->tm_mday);
|
||||||
|
Loading…
Reference in New Issue
Block a user