$NetBSD: patch-ai,v 1.5 2025/04/21 21:25:18 wiz Exp $

--- utils.c.orig	1992-09-09 10:31:16.000000000 -0400
+++ utils.c
@@ -18,6 +18,7 @@ Please read the file COPYRIGHT for furth
 #include <signal.h>
 #include <sys/wait.h>
 #include <sys/time.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #ifdef ISC
@@ -25,8 +26,10 @@ Please read the file COPYRIGHT for furth
 #else
 #include <sys/resource.h>
 #endif
+#include <unistd.h>
 #include "globals.h"
 
+extern void initialize_siglist A((void)) ;
 
 /* Signal handler, print message and exit */
 SIG_HANDLER_RET exitsig(sig)
@@ -70,10 +73,10 @@ char *s ;
 
 /* set up signal handling. All except TSTP, CONT, CLD, and QUIT
  * are caught with exitsig(). */
-init_signals()
+void init_signals()
 {
     int i ;
-#ifdef SIG_SETMASK		/* only with BSD signals */
+#if defined(SIG_SETMASK) && !defined(__NetBSD__)		/* only with BSD signals */
     static struct sigvec svec = { exitsig, ~0, 0 } ;
 #endif
 
@@ -103,7 +106,7 @@ init_signals()
 	  case SIGQUIT:		/* if the user wants a core dump, */
 	    continue ;		/* they can have it. */
 	  default:	    
-#ifdef SIG_SETMASK
+#if defined(SIG_SETMASK) && !defined(__NetBSD__)
 	    sigvec(i, &svec, NULL) ;
 #else
 	    signal(i, exitsig) ;
