$OpenBSD: patch-nspr_pr_src_pthreads_ptthread_c,v 1.4 2015/03/16 19:39:45 landry Exp $

On OpenBSD pthread_set_name_np returns void

--- nspr/pr/src/pthreads/ptthread.c.orig	Thu Jun  5 23:42:08 2014
+++ nspr/pr/src/pthreads/ptthread.c	Wed Jun 11 07:58:34 2014
@@ -16,6 +16,7 @@
 #include "prpdce.h"
 
 #include <pthread.h>
+#include <pthread_np.h>
 #include <unistd.h>
 #include <string.h>
 #include <signal.h>
@@ -1750,7 +1755,8 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const c
     memcpy(thread->name, name, nameLen + 1);
 
 #if defined(OPENBSD) || defined(FREEBSD)
-    result = pthread_set_name_np(thread->id, name);
+    pthread_set_name_np(thread->id, name);
+    result = 0;
 #else /* not BSD */
     /*
      * On OSX, pthread_setname_np is only available in 10.6 or later, so test
