$NetBSD: patch-aa,v 1.3 2007/11/13 18:01:58 joerg 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) { +# if !defined(__NetBSD__) || defined(si_value) sys_timer_struct *timer = reinterpret_cast(extra->si_value.sival_ptr); +# else + sys_timer_struct *timer = reinterpret_cast(extra->si_sigval.sival_ptr); +# endif timer->callback(reinterpret_cast(timer)); } #else