Description: Fix FTBFS with -Werror=implicit-function-declaration
Author: Andreas Metzler <ametzler@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/1065772
Forwarded: no
Last-Update: 2024-03-10

--- a/Wnn/jlib/js.c
+++ b/Wnn/jlib/js.c
@@ -78,10 +78,11 @@ extern  Variables
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <time.h>
 
 #include "jd_sock.h"
 #include "commonhd.h"
 #include "demcom.h"
 #include "wnn_config.h"
--- a/Wnn/etc/pwd.c
+++ b/Wnn/etc/pwd.c
@@ -44,10 +44,11 @@
 #  include <strings.h>
 #endif /* STDC_HEADERS */
 #if HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
+#include <time.h>
 #include "commonhd.h"
 #include "jslib.h"
 #include "wnn_os.h"
 #endif /* !JS */
 
--- a/configure.in
+++ b/configure.in
@@ -548,10 +548,11 @@ else
       LIBS="${LIBS} -l${libname}"
       AC_TRY_RUN([
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
 #endif
+#include <stdlib.h>
 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
 	res="OK", res="FAIL", res="FAIL")
       if test "$res" = "OK"; then
 	TERMLIB="${TERMLIB} -l${libname}"
 	dnl lname=`echo ${libname} | sed 'y/termcaplibnus/TERMCAPLIBNUS/'`
@@ -570,10 +571,12 @@ if test "x$TERMLIB" != "x"; then
   AC_MSG_CHECKING(whether we talk terminfo)
   AC_TRY_RUN([
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
 #endif
+#include <stdlib.h>
+#include <string.h>
 main()
 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }],
 	[ AC_MSG_RESULT([no -- we are in termcap land])
 	  CNVFILE_SUBDIR=bsd ],
 	[ AC_DEFINE(HAVE_TERMINFO, 1, [terminfo spoken here])
@@ -830,11 +833,13 @@ if test "$WRAP_TRY" = yes -o "$WRAP_TRY"
     CFLAGS="$WRAPINCLUDES $CFLAGS"
     OLDLIBS="$LIBS"
     WRAPLIB=${WRAPLIB:-"-lwrap"}
     LIBS="$WRAPLIB $OLDLIBS"
     AC_MSG_CHECKING([libwrap is working])
-    AC_TRY_LINK([ int allow_severity; int deny_severity; ],
+    AC_TRY_LINK([#include <tcpd.h>
+		 int allow_severity;
+		 int deny_severity; ],
 		[ hosts_access(); ],
 		[ AC_MSG_RESULT(yes)
 		  AC_DEFINE(HAVE_LIBWRAP, 1,
 		           [Define if you have libwrap (TCP wrapper) support.])
 		  AC_SUBST(WRAPLIB)],
--- a/Wnn/uum/epilogue.c
+++ b/Wnn/uum/epilogue.c
@@ -37,10 +37,14 @@
 #include "jllib.h"
 #include "commonhd.h"
 #include "sdefine.h"
 #include "sheader.h"
 
+#ifdef HAVE_TERMINFO
+void closeTermData ();
+#endif
+
 void
 epilogue_no_close ()
 {
   throw_col (0);
   clr_line ();
