$NetBSD: patch-ae,v 1.1 2000/10/07 19:24:15 kim Exp $

NetBSD has no sigwait() available.

--- lib/timer/signal.c.orig	Tue Feb 29 17:28:54 2000
+++ lib/timer/signal.c	Fri Oct  6 20:59:25 2000
@@ -30,7 +30,7 @@
     sigset_t set;
 
     sigemptyset (&set);
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__NetBSD__)
     sigaddset (&set, SIGALRM);
 #endif /* __linux__ */
     sigaddset (&set, SIGHUP);
@@ -57,7 +57,7 @@
 /* function where alarm is delivered */
 static void_fn_t timer_fire_fn = NULL;
 
-#if !defined(HAVE_LIBPTHREAD) || defined (__linux__)
+#if !defined(HAVE_LIBPTHREAD) || defined (__linux__) || defined(__NetBSD__)
 /* Thread uses sigwait(), instead */
 
 static int alarm_pending = 0;
@@ -88,7 +88,7 @@
 void
 mrt_alarm (void)
 {
-#if defined(HAVE_LIBPTHREAD) && !defined(__linux__)
+#if defined(HAVE_LIBPTHREAD) && !defined(__linux__) && !defined(__NetBSD__)
     int sig;
     sigset_t set;
 
@@ -164,7 +164,7 @@
     sigset_t set;
 #endif /* NT */
 
-#if !defined(HAVE_LIBPTHREAD) || defined(__linux__)
+#if !defined(HAVE_LIBPTHREAD) || defined(__linux__) || defined(__NetBSD__)
 #ifdef HAVE_SIGACTION /* POSIX actually */
     {
     	struct sigaction act;
@@ -191,7 +191,7 @@
     sigemptyset (&set);
     sigaddset (&set, SIGALRM);
 #endif /* NT */
-#if defined(HAVE_LIBPTHREAD) && !defined(__linux__)
+#if defined(HAVE_LIBPTHREAD) && !defined(__linux__) && !defined(__NetBSD__)
     /* sigwait() will be used so that ALARM must be blocked 
        even in the main thread */
     pthread_sigmask (SIG_BLOCK, &set, NULL);
