guix-mirrors/gnu/packages/patches/glibc-hurd-2.41-pthread-sigmask.patch
Yelninei 6cebf0e1d5
gnu: glibc/hurd: Fix gnulib tests.
With glibc-2.41 several gnulib tests are failing on the Hurd in multiple core packages
- test-once1
- test-pthread_sigmask1
- test-symlink/test-symlinkat

This adds the relevant patches from glibc upstream or the version from the
debian glibc adapted for glibc 2.41.

* gnu/packages/patches/glibc-hurd-2.41-pthread-once.patch: New patch.
* gnu/packages/patches/glibc-hurd-2.41-pthread-sigmask.patch: New patch.
* gnu/packages/patches/glibc-hurd-2.41-symlink.patch: New patch.
* gnu/packages/base.scm (glibc/hurd): Add them.
* gnu/local.mk : Register them.

Change-Id: I90ec984757da54ebbc7cb7817de00f2876f4a81a
2025-07-18 20:17:33 +02:00

22 lines
827 B
Diff

Taken from:
https://salsa.debian.org/glibc-team/glibc/-/blob/6c823b5862bd91ca757eeb9c6f5326875bc8af01/debian/patches/hurd-i386/git-pthread_sigmask_nothread.diff
Upstream 2.42 has a much more involved cleanup fix which in the end
boils down to this.
Index: glibc-upstream/sysdeps/mach/hurd/htl/pt-sigstate.c
===================================================================
--- glibc-upstream.orig/sysdeps/mach/hurd/htl/pt-sigstate.c
+++ glibc-upstream/sysdeps/mach/hurd/htl/pt-sigstate.c
@@ -36,7 +36,10 @@ __pthread_sigstate (struct __pthread *th
if (set != NULL)
new = *set;
- ss = _hurd_thread_sigstate (thread->kernel_thread);
+ if (thread == _pthread_self ())
+ ss = _hurd_self_sigstate ();
+ else
+ ss = _hurd_thread_sigstate (thread->kernel_thread);
assert (ss);
_hurd_sigstate_lock (ss);