summaryrefslogtreecommitdiff
path: root/user/mozjs/6006_musl_pthread_setname.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-07 19:07:39 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-07 19:07:39 +0000
commit59aa5ebb76efd757f107e61bb4cceb0a167c727e (patch)
tree2938d3db37170cccba266cf0ae899f479bbb99ad /user/mozjs/6006_musl_pthread_setname.patch
parentbbcfbb2837243b567861c0f37961bec1cb3cb17e (diff)
downloadpackages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.tar.gz
packages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.tar.bz2
packages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.tar.xz
packages-59aa5ebb76efd757f107e61bb4cceb0a167c727e.zip
user/mozjs: bump to 60.5.2
Diffstat (limited to 'user/mozjs/6006_musl_pthread_setname.patch')
-rw-r--r--user/mozjs/6006_musl_pthread_setname.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/mozjs/6006_musl_pthread_setname.patch b/user/mozjs/6006_musl_pthread_setname.patch
new file mode 100644
index 000000000..213509ff7
--- /dev/null
+++ b/user/mozjs/6006_musl_pthread_setname.patch
@@ -0,0 +1,29 @@
+From: Jory A. Pratt <anarchy@gentoo.org>
+
+set pthread name for non glibc systems
+
+diff --git a/js/src/threading/posix/Thread.cpp b/js/src/threading/posix/Thread.cpp
+--- a/js/src/threading/posix/Thread.cpp
++++ b/js/src/threading/posix/Thread.cpp
+@@ -155,18 +155,20 @@
+ int rv;
+ #ifdef XP_DARWIN
+ rv = pthread_setname_np(name);
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ pthread_set_name_np(pthread_self(), name);
+ rv = 0;
+ #elif defined(__NetBSD__)
+ rv = pthread_setname_np(pthread_self(), "%s", (void*)name);
+-#else
++#elif defined(__GLIBC__)
+ rv = pthread_setname_np(pthread_self(), name);
++#else
++ rv = 0;
+ #endif
+ MOZ_RELEASE_ASSERT(!rv);
+ }
+
+ void js::ThisThread::GetName(char* nameBuffer, size_t len) {
+ MOZ_RELEASE_ASSERT(len >= 16);
+
+ int rv = -1;