From f6153b23bf3372d6d8093c2a8ef158d626f75018 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 4 Dec 2023 05:56:26 -0600 Subject: user/mozjs: Move to legacy/ We do not need years-old SpiderMonkey any more. --- legacy/mozjs/6006_musl_pthread_setname.patch | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 legacy/mozjs/6006_musl_pthread_setname.patch (limited to 'legacy/mozjs/6006_musl_pthread_setname.patch') diff --git a/legacy/mozjs/6006_musl_pthread_setname.patch b/legacy/mozjs/6006_musl_pthread_setname.patch new file mode 100644 index 000000000..213509ff7 --- /dev/null +++ b/legacy/mozjs/6006_musl_pthread_setname.patch @@ -0,0 +1,29 @@ +From: Jory A. Pratt + +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; -- cgit v1.2.3-70-g09d2