Implement the ast_get_tid() function for NetBSD system. NetBSD supports
getting the TID via _lwp_self().
ASTERISK-29850
Change-Id: If57fd3f9ea15ef5d010bfbdcbbbae9b379f72f8c
#include <unistd.h>
#if defined(__APPLE__)
#include <mach/mach.h>
+#elif defined(__NetBSD__)
+#include <lwp.h>
#elif defined(HAVE_SYS_THR_H)
#include <sys/thr.h>
#endif
long lwpid;
thr_self(&lwpid); /* available since sys/thr.h creation 2003 */
ret = lwpid;
+#elif defined(__NetBSD__)
+ ret = _lwp_self();
#endif
return ret;
}