qi: Make is_readable() function more flatter
[dragora.git] / patches / tcp_wrappers / fix_warnings2
blob0fb4ac7a56bacf22535139d22da65b842b0895ff
1 --- a/clean_exit.c
2 +++ b/clean_exit.c
3 @@ -13,6 +13,7 @@ static char sccsid[] = "@(#) clean_exit.
4  #endif
5  
6  #include <stdio.h>
7 +#include <unistd.h>
8  
9  extern void exit();
11 --- a/hosts_access.c
12 +++ b/hosts_access.c
13 @@ -34,6 +34,7 @@ static char sccsid[] = "@(#) hosts_acces
14  #include <netinet/in.h>
15  #include <arpa/inet.h>
16  #include <stdio.h>
17 +#include <stdlib.h>
18  #include <syslog.h>
19  #include <ctype.h>
20  #include <errno.h>
21 @@ -54,6 +55,9 @@ extern int errno;
23  #include "tcpd.h"
25 +unsigned long cidr_mask_addr(char *str);
26 +int yp_get_default_domain(char **ptr);
28  /* Error handling. */
30  extern jmp_buf tcpd_buf;
31 --- a/misc.c
32 +++ b/misc.c
33 @@ -13,6 +13,7 @@ static char sccsic[] = "@(#) misc.c 1.2
34  #include <netinet/in.h>
35  #include <arpa/inet.h>
36  #include <stdio.h>
37 +#include <stdlib.h>
38  #include <string.h>
40  #include "tcpd.h"
41 --- a/options.c
42 +++ b/options.c
43 @@ -41,6 +41,7 @@ static char sccsid[] = "@(#) options.c 1
44  #include <netinet/in.h>
45  #include <netdb.h>
46  #include <stdio.h>
47 +#include <stdlib.h>
48  #include <unistd.h>
49  #include <syslog.h>
50  #include <pwd.h>
51 --- a/percent_x.c
52 +++ b/percent_x.c
53 @@ -17,6 +17,7 @@ static char sccsid[] = "@(#) percent_x.c
54  /* System libraries. */
56  #include <stdio.h>
57 +#include <unistd.h>
58  #include <syslog.h>
59  #include <string.h>
61 --- a/rfc931.c
62 +++ b/rfc931.c
63 @@ -16,6 +16,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
64  /* System libraries. */
66  #include <stdio.h>
67 +#include <unistd.h>
68  #include <syslog.h>
69  #include <sys/types.h>
70  #include <sys/socket.h>
71 --- a/tcpd.c
72 +++ b/tcpd.c
73 @@ -22,6 +22,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10
74  #include <sys/socket.h>
75  #include <netinet/in.h>
76  #include <stdio.h>
77 +#include <unistd.h>
78  #include <syslog.h>
79  #include <string.h>
81 @@ -38,10 +39,12 @@ static char sccsid[] = "@(#) tcpd.c 1.10
82  #include "patchlevel.h"
83  #include "tcpd.h"
85 +void fix_options(struct request_info *);
87  int     allow_severity = SEVERITY;     /* run-time adjustable */
88  int     deny_severity = LOG_WARNING;   /* ditto */
90 -main(argc, argv)
91 +int main(argc, argv)
92  int     argc;
93  char  **argv;
94  {
95 --- a/update.c
96 +++ b/update.c
97 @@ -20,6 +20,7 @@ static char sccsid[] = "@(#) update.c 1.
98  /* System libraries */
100  #include <stdio.h>
101 +#include <unistd.h>
102  #include <syslog.h>
103  #include <string.h>
105 --- a/fakelog.c
106 +++ b/fakelog.c
107 @@ -17,7 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1
109  /* ARGSUSED */
111 -openlog(name, logopt, facility)
112 +void openlog(name, logopt, facility)
113  char   *name;
114  int     logopt;
115  int     facility;
116 @@ -27,7 +27,7 @@ int     facility;
118  /* vsyslog - format one record */
120 -vsyslog(severity, fmt, ap)
121 +void vsyslog(severity, fmt, ap)
122  int     severity;
123  char   *fmt;
124  va_list ap;
125 @@ -43,7 +43,7 @@ va_list ap;
127  /* VARARGS */
129 -VARARGS(syslog, int, severity)
130 +void VARARGS(syslog, int, severity)
132      va_list ap;
133      char   *fmt;
134 @@ -56,7 +56,7 @@ VARARGS(syslog, int, severity)
136  /* closelog - dummy */
138 -closelog()
139 +void closelog()
141      /* void */
143 --- a/safe_finger.c
144 +++ b/safe_finger.c
145 @@ -22,10 +22,15 @@ static char sccsid[] = "@(#) safe_finger
147  #include <sys/types.h>
148  #include <sys/stat.h>
149 +#include <sys/wait.h>
150 +#include <fcntl.h>
151  #include <signal.h>
152  #include <stdio.h>
153 +#include <stdlib.h>
154 +#include <unistd.h>
155  #include <ctype.h>
156  #include <pwd.h>
157 +#include <grp.h>
158  #include <syslog.h>
160  extern void exit();
161 @@ -45,6 +50,8 @@ int     finger_pid;
162  int    allow_severity = SEVERITY;
163  int    deny_severity = LOG_WARNING;
165 +int     pipe_stdin(char **argv);
167  void    cleanup(sig)
168  int     sig;
170 @@ -52,7 +59,7 @@ int     sig;
171      exit(0);
174 -main(argc, argv)
175 +int main(argc, argv)
176  int     argc;
177  char  **argv;
179 --- a/tcpdchk.c
180 +++ b/tcpdchk.c
181 @@ -28,6 +28,8 @@ static char sccsid[] = "@(#) tcpdchk.c 1
182  #include <netinet/in.h>
183  #include <arpa/inet.h>
184  #include <stdio.h>
185 +#include <stdlib.h>
186 +#include <unistd.h>
187  #include <syslog.h>
188  #include <setjmp.h>
189  #include <errno.h>
190 @@ -53,6 +55,8 @@ extern char *optarg;
191  #include "inetcf.h"
192  #include "scaffold.h"
194 +unsigned long cidr_mask_addr(char *str);
196  /* list of programs which are known to be linked with libwrap in debian */
197  static const char *const libwrap_programs[] = {
198      "portmap", "mountd", "statd", "ugidd",
199 --- a/tcpdmatch.c
200 +++ b/tcpdmatch.c
201 @@ -26,6 +26,7 @@ static char sccsid[] = "@(#) tcpdmatch.c
202  #include <arpa/inet.h>
203  #include <netdb.h>
204  #include <stdio.h>
205 +#include <unistd.h>
206  #include <syslog.h>
207  #include <setjmp.h>
208  #include <string.h>
209 --- a/try-from.c
210 +++ b/try-from.c
211 @@ -37,7 +37,7 @@ static char sccsid[] = "@(#) try-from.c
212  int     allow_severity = SEVERITY;     /* run-time adjustable */
213  int     deny_severity = LOG_WARNING;   /* ditto */
215 -main(argc, argv)
216 +int main(argc, argv)
217  int     argc;
218  char  **argv;
220 --- a/inetcf.c
221 +++ b/inetcf.c
222 @@ -12,6 +12,7 @@ static char sccsid[] = "@(#) inetcf.c 1.
223  #include <sys/types.h>
224  #include <sys/stat.h>
225  #include <stdio.h>
226 +#include <stdlib.h>
227  #include <errno.h>
228  #include <string.h>
230 @@ -20,6 +21,7 @@ extern void exit();
232  #include "tcpd.h"
233  #include "inetcf.h"
234 +#include "scaffold.h"
236   /*
237    * Network configuration files may live in unusual places. Here are some