$NetBSD$

--- src/unix/threadpsx.cpp.orig	2008-06-20 13:07:10.000000000 +0400
+++ src/unix/threadpsx.cpp
@@ -65,6 +65,13 @@
     #define THR_ID(thr) ((long)(thr)->GetId())
 #endif
 
+#ifdef __NetBSD__
+#include <sys/param.h>
+#if __NetBSD_Version__ < 499005000 && defined(HAVE_THREAD_PRIORITY_FUNCTIONS)
+#undef HAVE_THREAD_PRIORITY_FUNCTIONS
+#endif
+#endif
+
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
