$NetBSD: patch-ae,v 1.2 2005/05/01 10:34:49 jdc Exp $ --- netserv.c.dist 1994-04-10 11:07:23.000000000 +0100 +++ netserv.c 2005-04-05 15:25:17.000000000 +0100 @@ -106,7 +106,11 @@ #ifdef HAVE_FDSET +# ifdef Linux + fd_set readmask; +# else struct fd_set readmask; +# endif #else struct fd_mask readmask; #endif @@ -629,7 +633,7 @@ #ifdef RS6000 /* ibm rs/6000 */ sigemptyset(&vec1.sa_mask); #else - vec1.sa_mask = 0; + (void)sigprocmask (SIG_SETMASK, 0, NULL); #endif vec1.sa_flags = 0; if ( sigaction(SIGALRM, &vec1, (struct sigaction *) 0) == -1) perror("SIGALRM\n"); @@ -652,7 +656,7 @@ #ifdef RS6000 /* ibm rs/6000 */ sigemptyset(&svec1.sa_mask); #else - svec1.sa_mask = 0; + (void)sigprocmask (SIG_SETMASK, 0, NULL); #endif svec1.sa_flags = 0; if(sigaction(SIGCHLD,&svec1,(struct sigaction *)0) == -1) perror("SIGCHLD\n"); @@ -779,7 +783,11 @@ void io_cntl(void) { #ifdef HAVE_FDSET +# ifdef Linux + fd_set readmask1; +# else struct fd_set readmask1; +# endif #else struct fd_mask readmask1; #endif @@ -914,7 +922,7 @@ char *saddr = (char *) &(((struct sockaddr_in *) &(q->remoteaddr))->sin_addr.s_addr); hp = gethostbyaddr(saddr,4,AF_INET); - if(strlen(hp->h_name) > 0) + if(hp && strlen(hp->h_name) > 0) strcpy(name,hp->h_name); else sprintf(name,"%d.%d.%d.%d",(int) saddr[0],(int) saddr[1],(int) saddr[2],(int) saddr[3]);