Index: lib/msan/msan_interceptors.cc =================================================================== --- lib/msan/msan_interceptors.cc +++ lib/msan/msan_interceptors.cc @@ -37,6 +37,18 @@ // ACHTUNG! No other system header includes in this file. // Ideally, we should get rid of stdarg.h as well. +#if SANITIZER_NETBSD +#define gettimeofday __gettimeofday50 +#define getrusage __getrusage50 +#define shmctl __shmctl50 +#endif + +#if SANITIZER_NETBSD +#define sigaction_symname __sigaction14 +#else +#define sigaction_symname sigaction +#endif + using namespace __msan; using __sanitizer::memory_order; @@ -1298,7 +1310,7 @@ pnew_act->sigaction = (decltype(pnew_act->sigaction))new_cb; } } - res = REAL(sigaction)(signo, pnew_act, oldact); + res = REAL(sigaction_symname)(signo, pnew_act, oldact); if (res == 0 && oldact) { uptr cb = (uptr)oldact->sigaction; if (cb == (uptr)SignalAction || cb == (uptr)SignalHandler) { @@ -1306,7 +1318,7 @@ } } } else { - res = REAL(sigaction)(signo, act, oldact); + res = REAL(sigaction_symname)(signo, act, oldact); } if (res == 0 && oldact) {