mirror of
https://git.freebsd.org/ports.git
synced 2025-06-27 15:40:32 -04:00
- update firefox-esr, thunderbird-esr, linux-thunderbird and linux-firefox to 10.0.7 - update seamonkey and linux-seamonkey to 2.12 - update nss to 3.13.6 - update bsdipc code (posix_spawn, SysV shared memory) - rename patches to easily track those not (yet) submitted upstream - reduce package size, except for www/libxul[1] - restore default objdir to what it was in 13.0 - fix mail/enigmail after thunderbird build changes - don't accidentally pick up headers from installed ports[3] - add support for PREFIX != LOCALBASE to Makefile.webplugins [4] - document vulnerabilities in vuln.xml - *miscellaneous cleanups and fixups* Obtained from: OpenBSD ports[1] PR: ports/159831, ports/160933, ports/170467[3], ports/170236 [4] Submitted by: avilla [4] In collaboration with: Jan Beich <jbeich@tormail.net> Who did most of the hard work.
35 lines
1.1 KiB
Text
35 lines
1.1 KiB
Text
--- ../pr/src/pthreads/ptthread.c
|
|
+++ ../pr/src/pthreads/ptthread.c
|
|
@@ -21,6 +21,10 @@
|
|
#include <signal.h>
|
|
#include <dlfcn.h>
|
|
|
|
+#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY)
|
|
+#include <pthread_np.h>
|
|
+#endif
|
|
+
|
|
#ifdef SYMBIAN
|
|
/* In Open C sched_get_priority_min/max do not work properly, so we undefine
|
|
* _POSIX_THREAD_PRIORITY_SCHEDULING here.
|
|
@@ -1619,7 +1623,7 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name)
|
|
{
|
|
PRThread *thread;
|
|
size_t nameLen;
|
|
- int result;
|
|
+ int result = 0;
|
|
|
|
if (!name) {
|
|
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
|
|
@@ -1637,8 +1641,10 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name)
|
|
return PR_FAILURE;
|
|
memcpy(thread->name, name, nameLen + 1);
|
|
|
|
-#if defined(OPENBSD) || defined(FREEBSD)
|
|
- result = pthread_set_name_np(thread->id, name);
|
|
+#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY)
|
|
+ pthread_set_name_np(thread->id, name);
|
|
+#elif defined(NETBSD)
|
|
+ pthread_setname_np(thread->id, "%s", name);
|
|
#else /* not BSD */
|
|
/*
|
|
* On OSX, pthread_setname_np is only available in 10.6 or later, so test
|