summaryrefslogtreecommitdiff
path: root/comms/plptools/patches/patch-ac
blob: 5c4d049fba625e2df14839019e78038412b1411a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$NetBSD: patch-ac,v 1.6 2001/11/06 22:23:50 jlam Exp $

--- plpftp/ftp.cc.orig	Mon Jan 17 06:49:41 2000
+++ plpftp/ftp.cc
@@ -34,6 +34,10 @@
 #include <sys/stat.h>
 #include <signal.h>
 
+#ifdef __NetBSD__
+#include <stdio.h>
+#endif
+
 #include "defs.h"
 #include "ftp.h"
 #include "rfsv.h"
@@ -335,7 +339,7 @@
 				// never used to do this
 				char dateBuff[100];
                                	struct tm *t;
-                               	t = localtime(&time);
+                               	t = localtime((time_t *)&time);
                                	strftime(dateBuff, 100, "%c", t);
                                	cout << a.opAttr(attr);
                                	cout << " " << dec << setw(10) << setfill(' ') << size;
@@ -365,7 +369,7 @@
 			else {
 				char dateBuff[100];
 				struct tm *t;
-				t = localtime(&mtime);
+				t = localtime((time_t *)&mtime);
 				strftime(dateBuff, 100, "%c %Z", t);
 				cout << dateBuff << endl;
 			}
@@ -457,7 +461,7 @@
 					long attr = s.getDWord(8);
 					char dateBuff[100];
                                 	struct tm *t;
-                                	t = localtime(&date);
+                                	t = localtime((time_t *)&date);
                                 	strftime(dateBuff, 100, "%c", t);
                                 	cout << a.opAttr(attr);
                                 	cout << " " << dec << setw(10) << setfill(' ') << size;
@@ -911,7 +915,7 @@
 {
 	char **matches = NULL;
 
-	rl_completion_entry_function = (Function *)null_completion;
+	rl_completion_entry_function = (CPFunction *)null_completion;
 	if (start == 0)
 		matches = completion_matches(text, command_generator);
 	else {
@@ -945,7 +949,7 @@
 {
 #if HAVE_LIBREADLINE
 	rl_readline_name = "plpftp";
-	rl_completion_entry_function = (Function *)null_completion;
+	rl_completion_entry_function = (CPFunction *)null_completion;
 	rl_attempted_completion_function = (CPPFunction *)do_completion;
 #endif
 }