1From 9c97b5db237a793e0d1b6b0241570bdc6e35ee24 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 7 Aug 2022 17:42:24 -0700
4Subject: [PATCH] Fix implicit-function-declaration warnings
5
6These are seen with clang-15+
7
8Upstream-Status: Inappropriate [upstream is dead]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 hosts_access.c | 3 +++
12 safe_finger.c  | 1 +
13 shell_cmd.c    | 3 +++
14 tcpd.c         | 2 +-
15 tcpdchk.c      | 1 +
16 workarounds.c  | 1 +
17 6 files changed, 10 insertions(+), 1 deletion(-)
18
19diff --git a/hosts_access.c b/hosts_access.c
20index 0133e5e..58697ea 100644
21--- a/hosts_access.c
22+++ b/hosts_access.c
23@@ -33,6 +33,7 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
24 #endif
25 #include <netinet/in.h>
26 #include <arpa/inet.h>
27+#include <rpcsvc/ypclnt.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <syslog.h>
31@@ -45,6 +46,8 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
32 #endif
33
34 extern int errno;
35+extern int match_pattern_ylo(const char *s, const char *pattern);
36+extern unsigned long cidr_mask_addr(char* str);
37
38 #ifndef	INADDR_NONE
39 #define	INADDR_NONE	(-1)		/* XXX should be 0xffffffff */
40diff --git a/safe_finger.c b/safe_finger.c
41index 23afab1..a6458fb 100644
42--- a/safe_finger.c
43+++ b/safe_finger.c
44@@ -34,6 +34,7 @@ static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
45 #include <syslog.h>
46
47 extern void exit();
48+extern int pipe_stdin(char  **argv);
49
50 /* Local stuff */
51
52diff --git a/shell_cmd.c b/shell_cmd.c
53index 62d31bc..a566092 100644
54--- a/shell_cmd.c
55+++ b/shell_cmd.c
56@@ -16,10 +16,13 @@ static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
57
58 #include <sys/types.h>
59 #include <sys/param.h>
60+#include <sys/wait.h>
61+#include <fcntl.h>
62 #include <signal.h>
63 #include <stdio.h>
64 #include <syslog.h>
65 #include <string.h>
66+#include <unistd.h>
67
68 extern void exit();
69
70diff --git a/tcpd.c b/tcpd.c
71index dc9ff17..4353caa 100644
72--- a/tcpd.c
73+++ b/tcpd.c
74@@ -46,7 +46,7 @@ void fix_options(struct request_info *);
75 int     allow_severity = SEVERITY;	/* run-time adjustable */
76 int     deny_severity = LOG_WARNING;	/* ditto */
77
78-main(argc, argv)
79+void main(argc, argv)
80 int     argc;
81 char  **argv;
82 {
83diff --git a/tcpdchk.c b/tcpdchk.c
84index 5dca8bd..67c12ce 100644
85--- a/tcpdchk.c
86+++ b/tcpdchk.c
87@@ -38,6 +38,7 @@ static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
88
89 extern int errno;
90 extern void exit();
91+extern unsigned long cidr_mask_addr(char* str);
92 extern int optind;
93 extern char *optarg;
94
95diff --git a/workarounds.c b/workarounds.c
96index b22b378..6335049 100644
97--- a/workarounds.c
98+++ b/workarounds.c
99@@ -21,6 +21,7 @@ char    sccsid[] = "@(#) workarounds.c 1.6 96/03/19 16:22:25";
100 #include <stdio.h>
101 #include <syslog.h>
102 #include <string.h>
103+#include <unistd.h>
104
105 extern int errno;
106
107--
1082.37.1
109
110