]> sjero.net Git - wget/blobdiff - src/ftp-ls.c
Don't assume time_t* is compatible with long*.
[wget] / src / ftp-ls.c
index ac4786b536236bdddea12691c9d51c9a758aa8a1..409996c350d2ad2f9e25e030e03b16558b4b9be9 100644 (file)
@@ -1,6 +1,6 @@
 /* Parsing FTP `ls' output.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007 Free Software Foundation, Inc. 
+   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 
 
 This file is part of GNU Wget.
 
@@ -894,7 +894,8 @@ ftp_index (const char *file, struct url *u, struct fileinfo *f)
             "Jan", "Feb", "Mar", "Apr", "May", "Jun",
             "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],
                   ptm->tm_mday);