Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 445634 Details for
Bug 593030
www-client/firefox-49.0_beta8 fails to build on musl-amd64 with 'pthread_setname_np was not declared in this scope'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for sys-libs/musl
musl-threadname.patch (text/plain), 1.01 KB, created by
Felix Janda
on 2016-09-14 01:54:09 UTC
(
hide
)
Description:
patch for sys-libs/musl
Filename:
MIME Type:
Creator:
Felix Janda
Created:
2016-09-14 01:54:09 UTC
Size:
1.01 KB
patch
obsolete
>--- a/include/pthread.h >+++ b/include/pthread.h >@@ -214,6 +214,7 @@ struct cpu_set_t; > int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *); > int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *); > int pthread_getattr_np(pthread_t, pthread_attr_t *); >+int pthread_setname_np(pthread_t, const char *); > int pthread_tryjoin_np(pthread_t, void **); > int pthread_timedjoin_np(pthread_t, void **, const struct timespec *); > #endif >--- /dev/null >+++ b/src/thread/pthread_setname_np.c >@@ -0,0 +1,24 @@ >+#include <fcntl.h> >+#include <string.h> >+#include <unistd.h> >+ >+#include "pthread_impl.h" >+ >+int pthread_setname_np(pthread_t thread, const char *name) >+{ >+ int fd, status = 0; >+ char f[sizeof "/proc/self/task//comm" + 7]; >+ ssize_t len; >+ >+ if ((len = strlen(name)) > 15) { >+ errno = ERANGE; >+ return 1; >+ } >+ >+ snprintf(f, sizeof f, "/proc/self/task/%d/comm", thread->tid); >+ if ((fd = open(f, O_WRONLY)) == -1) return 1; >+ if (write(fd, name, len) == -1) status = 1; >+ >+ close(fd); >+ return status; >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 593030
:
445130
|
445132
| 445634