$NetBSD: patch-ac,v 1.4 2005/08/06 21:22:24 tron Exp $

--- globals.h.orig	1992-08-30 20:04:27.000000000 +0100
+++ globals.h	2005-08-06 22:21:30.000000000 +0100
@@ -8,6 +8,12 @@
 */
 
 #include "patchlevel.h"
+ 
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#include <stdlib.h>
 
 /* globals for socket */
 
@@ -22,9 +28,16 @@
 #define A(args) ()
 #endif
 
+#ifndef USE_INET6
 int create_server_socket A((int port, int queue_length)) ;
 int create_client_socket A((char **hostname, int port)) ;
 int resolve_service A((char *name_or_number, char *protocol, char **name)) ;
+#else /* USE_INET6 */
+int *create_server_sockets A((char **port, int queue_length)) ;
+int create_client_socket A((char **hostname, char **port)) ;
+int socket_local_name A((int socket, char **name, char **ipname, char **port));
+int socket_remote_name A((int socket, char **name, char **ipname, char **port));
+#endif /* USE_INET6 */
 void catchsig A((int sig)) ;
 void usage A((void)) ;
 int do_read_write A((int from, int to)) ;
@@ -49,4 +62,7 @@
 extern int crlfflag ;
 extern int active_socket ;
 extern char *progname ;
-extern char *sys_errlist[], *sys_siglist[] ;
+
+#if !(defined(BSD) && (BSD >=199306)) && !defined(__linux__)
+     extern char *sys_errlist[], *sys_siglist[] ;
+#endif
