blob: 0c3257d801a633d87278f310a126c904e871b1f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$NetBSD: patch-ab,v 1.8 2004/01/23 22:52:29 recht Exp $
--- lib/ftp.c.orig 2004-01-21 17:50:05.000000000 +0100
+++ lib/ftp.c 2004-01-23 23:46:58.000000000 +0100
@@ -2210,11 +2210,12 @@
#ifdef HAVE_STRFTIME
if(data->set.get_filetime && (data->info.filetime>=0) ) {
struct tm *tm;
+ time_t filetime = 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(&filetime, &buffer);
#else
- tm = gmtime((time_t *)&data->info.filetime);
+ tm = gmtime(&filetime);
#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",
|