pkgsrc/sysutils/socket/patches/patch-ac
2006-01-25 02:12:10 +00:00

52 lines
1.6 KiB
Text

$NetBSD: patch-ac,v 1.5 2006/01/25 02:12:10 joerg Exp $
--- globals.h.orig 1992-08-30 19:04:27.000000000 +0000
+++ globals.h
@@ -8,6 +8,12 @@ Please read the file COPYRIGHT for furth
*/
#include "patchlevel.h"
+
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#include <stdlib.h>
/* globals for socket */
@@ -22,9 +28,16 @@ Please read the file COPYRIGHT for furth
#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)) ;
@@ -37,8 +50,6 @@ void add_crs A((char *from, char *to, in
void strip_crs A((char *from, char *to, int *sizep)) ;
void background A((void)) ;
-extern int errno ;
-
/* global variables */
extern int serverflag ;
extern int loopflag ;
@@ -49,4 +60,7 @@ extern int quitflag ;
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