diff options
| author | Michael Forney <mforney@mforney.org> | 2021-07-08 16:50:02 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2021-07-12 22:23:42 -0700 |
| commit | 583d84863c517f3a0ccd25b84dd195f9f14cefed (patch) | |
| tree | c74b93ed50d2981ba7359a80016bda8cc4a30f57 /pkg | |
| parent | 03ff506c35e0aeaa208e38b9e98991dc869ab017 (diff) | |
musl: Add pthread_getname_np.c to sources
03ff506c added the source file but didn't add it to base.lua, so
it did not get built.
Also, update the patch to fix the error check.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/musl/base.lua | 1 | ||||
| -rw-r--r-- | pkg/musl/patch/0002-add-pthread_getname_np-function.patch | 6 | ||||
| -rw-r--r-- | pkg/musl/ver | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/pkg/musl/base.lua b/pkg/musl/base.lua index da7a2851..95469300 100644 --- a/pkg/musl/base.lua +++ b/pkg/musl/base.lua @@ -1145,6 +1145,7 @@ return { 'src/thread/pthread_getattr_np.c', 'src/thread/pthread_getconcurrency.c', 'src/thread/pthread_getcpuclockid.c', + 'src/thread/pthread_getname_np.c', 'src/thread/pthread_getschedparam.c', 'src/thread/pthread_getspecific.c', 'src/thread/pthread_join.c', diff --git a/pkg/musl/patch/0002-add-pthread_getname_np-function.patch b/pkg/musl/patch/0002-add-pthread_getname_np-function.patch index 8376b58b..2b732706 100644 --- a/pkg/musl/patch/0002-add-pthread_getname_np-function.patch +++ b/pkg/musl/patch/0002-add-pthread_getname_np-function.patch @@ -1,4 +1,4 @@ -From ffc49274d11cd77d0b6f92f6581f70e58871d370 Mon Sep 17 00:00:00 2001 +From 88632ac04b21a909df28f71ac325ce4bc0a80ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= <ericonr@disroot.org> Date: Tue, 20 Apr 2021 16:15:15 -0300 Subject: [PATCH] add pthread_getname_np function @@ -24,7 +24,7 @@ index 0492f26a..89fd9ff7 100644 int pthread_tryjoin_np(pthread_t, void **); diff --git a/src/thread/pthread_getname_np.c b/src/thread/pthread_getname_np.c new file mode 100644 -index 00000000..48d1a294 +index 00000000..85504e45 --- /dev/null +++ b/src/thread/pthread_getname_np.c @@ -0,0 +1,25 @@ @@ -47,7 +47,7 @@ index 00000000..48d1a294 + + snprintf(f, sizeof f, "/proc/self/task/%d/comm", thread->tid); + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); -+ if ((fd = open(f, O_RDONLY|O_CLOEXEC)) < 0 || (len = read(fd, name, len)) < 0) status = errno; ++ if ((fd = open(f, O_RDONLY|O_CLOEXEC)) < 0 || (len = read(fd, name, len)) == -1) status = errno; + else name[len-1] = 0; /* remove trailing new line only if successful */ + if (fd >= 0) close(fd); + pthread_setcancelstate(cs, 0); diff --git a/pkg/musl/ver b/pkg/musl/ver index d702939b..02b41e59 100644 --- a/pkg/musl/ver +++ b/pkg/musl/ver @@ -1 +1 @@ -1.2.2 r2 +1.2.2 r3 |
