2014-11-05 12:41:07 +01:00

33 lines
855 B
Plaintext

$NetBSD: patch-ap,v 1.4 2013/09/10 14:15:11 joerg Exp $
--- outgoing/listen.c.orig 1996-04-30 07:02:48.000000000 +0000
+++ outgoing/listen.c
@@ -49,14 +49,17 @@ static char copyright[] =
#include <sys/fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <arpa/inet.h>
#include <netinet/in.h>
#include <syslog.h>
#include <unistd.h>
#include <sys/time.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <netdb.h>
#include <sys/stat.h>
#include <sys/resource.h>
+#include <stdio.h>
+#include <stdlib.h>
void listener (port, addr, forkp)
int port;
@@ -116,7 +119,7 @@ void listener (port, addr, forkp)
do {
int pid;
struct sockaddr_in name;
- int namelen = sizeof name;
+ socklen_t namelen = sizeof name;
if ((clientSock =
accept (mpoolSock, (struct sockaddr *)&name, &namelen)) < 0)
{