fix_warnings2 5.0 KB

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