$NetBSD: patch-aa,v 1.2 2005/12/22 19:27:36 ghen Exp $

--- src/system/osapi/posix/systimer.cc.orig	2005-12-21 14:43:21.000000000 +0100
+++ src/system/osapi/posix/systimer.cc
@@ -31,7 +31,11 @@
 static const int kTimerSignal = SYSTIMER_SIGNAL;
 #ifdef USE_POSIX_REALTIME_CLOCK
 static void signal_handler(int signo, siginfo_t *extra, void *junk);
+#  ifdef __NetBSD__
+static const int kClockRT = CLOCK_PROF;
+#  else
 static const int kClockRT = CLOCK_PROCESS_CPUTIME_ID;
+#  endif
 static const int kClock = CLOCK_REALTIME;
 #elif USE_POSIX_SETITIMER
 static void signal_handler(int signo);
@@ -70,7 +74,11 @@ struct sys_timer_struct
 #ifdef USE_POSIX_REALTIME_CLOCK
 static void signal_handler(int signo, siginfo_t *extra, void *junk)
 {
+#  ifndef __NetBSD__
 	sys_timer_struct *timer = reinterpret_cast<sys_timer_struct *>(extra->si_value.sival_ptr);
+#  else
+	sys_timer_struct *timer = reinterpret_cast<sys_timer_struct *>(extra->si_sigval.sival_ptr);
+#  endif
 	timer->callback(reinterpret_cast<sys_timer>(timer));
 }
 #else
