--- a/lib/remopen.c
+++ b/lib/remopen.c
@@ -11,6 +11,7 @@
 #include <sys/un.h>
 #endif	/* defined(DO_HAVE_UNIX_DOMAIN) */
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <netdb.h>
 #include "nntp.h"
 #include "paths.h"
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -37,6 +37,7 @@ static void use_rcsid (const char *rid)
 
 
 #include <stdio.h>
+#include <time.h>
 #include <sys/types.h>
 #include "configdata.h"
 #include "clibrary.h"
--- a/innd/inndstart.c
+++ b/innd/inndstart.c
@@ -10,7 +10,9 @@
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <fcntl.h>
+#include <grp.h>
 #include "paths.h"
 #include "logging.h"
 #include "libinn.h"
--- a/nnrpd/nnrpd.h
+++ b/nnrpd/nnrpd.h
@@ -150,4 +150,6 @@ extern void		Reply();
 */
 #if defined(DO_PERL)
 char *HandleHeaders(char *artBody);
+int PERLsetup (char *, char *, char *);
+void PerlFilter(BOOL);
 #endif /* defined(DO_PERL) */
--- a/innd/innd.h
+++ b/innd/innd.h
@@ -606,4 +606,9 @@ extern void            TCLclose();
 #if defined(DO_PERL)
 char *HandleArticle(char *artBody);
 char *HandleMessageID(char *messageID);
+void PerlFilter(BOOL value);
+void PerlMode(OPERATINGMODE Mode, OPERATINGMODE NewMode, char *reason);
+int PERLreadfilter(char *filterfile, char *function);
+void PerlClose(void);
+int PERLsetup (char *, char *, char *);
 #endif /* defined(DO_PERL) */
--- a/lib/perl.c
+++ b/lib/perl.c
@@ -37,6 +37,7 @@ XS(boot_DynaLoader);
 
 void PerlSilence(void);
 void PerlUnSilence(void);
+int PERLreadfilter(char *filterfile, char *function);
 
 
 int	PerlFilterActive = FALSE;
--- a/innd/timer.c
+++ b/innd/timer.c
@@ -48,7 +48,7 @@ int		maxtimer = 0;
 
 unsigned	gettime()
 {
-	static			init = 0;
+	static int		init = 0;
 	static struct timeval	start_tv;
 	struct timeval		tv;
 
--- a/innd/nc.c
+++ b/innd/nc.c
@@ -133,7 +133,7 @@ STATIC _NCprecomcache NCprecomcache[NCPR
 unsigned long NCprecomhits;
 unsigned long NCprecomlookups;
 STATIC long NCprecompos, NCprecomval;
-STATIC NCprecominit = 0;
+STATIC int NCprecominit = 0;
 
 
 STATIC void
--- a/innd/rc.c
+++ b/innd/rc.c
@@ -30,6 +30,8 @@ extern unsigned long	htonl(); /* nobody
 #include <ident.h>
 #endif /* defined(DO_TCPIDENT_PATH) */
 
+int RCfix_options(int fd, struct sockaddr_in *remote);
+
 /*
 **  A remote host has an address and a password.
 */
