diff --git a/main/utils.c b/main/utils.c index dc94c994d1..29676fafc1 100644 --- a/main/utils.c +++ b/main/utils.c @@ -36,6 +36,8 @@ #include #if defined(__APPLE__) #include +#elif defined(__NetBSD__) +#include #elif defined(HAVE_SYS_THR_H) #include #endif @@ -2659,6 +2661,8 @@ int ast_get_tid(void) long lwpid; thr_self(&lwpid); /* available since sys/thr.h creation 2003 */ ret = lwpid; +#elif defined(__NetBSD__) + ret = _lwp_self(); #endif return ret; }