$NetBSD: patch-bd,v 1.2 2016/10/09 03:41:56 ryoon Exp $

--- lib/misc/util_misc.c.orig	2016-02-16 20:06:46.000000000 +0000
+++ lib/misc/util_misc.c
@@ -488,6 +488,15 @@ Util_GetCurrentThreadId(void)
    ASSERT_ON_COMPILE(sizeof(Util_ThreadID) >= sizeof(pthread_t));
 
    return pthread_self();
+#elif defined(__NetBSD__)
+   /*
+    * These OSes do not implement OS-native thread IDs. You probably
+    * didn't need one anyway, but guess that pthread_self works
+    * well enough.
+    */
+   ASSERT_ON_COMPILE(sizeof(Util_ThreadID) >= sizeof(pthread_t));
+
+   return pthread_self();
 #elif defined(_WIN32)
    return GetCurrentThreadId();
 #else
