guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit eace0cf1d9f602c5ae9d6ec066f8052d7b0d4633
Author: Yelninei <[email protected]>
AuthorDate: Thu May 7 12:44:02 2026 +0000

    gnu: glibc: Remove glibc-hurd-pthread-setcancelstate.patch
    
    IT fails to compile with glibnc 2.43:
    /tmp/guix-build-glibc-intermediate-2.43.drv-0/build/stdlib/fmtmsg.o
    fmtmsg.c: In function 'fmtmsg':
    fmtmsg.c:127:3: error: implicit declaration of function '__libc_ptf_call'; 
did you mean '__libc_fatal'? [-Wimplicit-function-declaration]
      127 |   __libc_ptf_call (__pthread_setcancelstate,
          |   ^~~~~~~~~~~~~~~
          |   __libc_fatal
    
    *  gnu/packages/base.scm (%glibc-patches): Remove
    glibc-hurd-pthread-setcancelstate.patch
    * gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch: Remove 
patch.
    * gnu/local.mk (dist_patch_DATA): Deregister it.
    
    Change-Id: Ib19c2275484bd69433e6ade9a0c2c1b9c1c71099
---
 gnu/local.mk                                       |  1 -
 gnu/packages/base.scm                              |  1 -
 .../glibc-hurd-pthread_setcancelstate.patch        | 92 ----------------------
 3 files changed, 94 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index addcedb27a1..af773f21b37 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1521,7 +1521,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/glibc-hurd-getauxval.patch              \
   %D%/packages/patches/glibc-hurd-gettyent.patch               \
   %D%/packages/patches/glibc-hurd-mach-print.patch             \
-  %D%/packages/patches/glibc-hurd-pthread_setcancelstate.patch \
   %D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch      \
   %D%/packages/patches/glibc-hurd64-gcc-14.2-tls-bug.patch     \
   %D%/packages/patches/glibc-ldd-powerpc.patch                 \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index fa1bf634b36..128004f0014 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -923,7 +923,6 @@ the store.")
         "glibc-hurd-mach-print.patch"
         "glibc-hurd-gettyent.patch"
         "glibc-hurd-getauxval.patch"
-        "glibc-hurd-pthread_setcancelstate.patch"
         "glibc-hurd64-gcc-14.2-tls-bug.patch"))
 
 (define-public glibc
diff --git a/gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch 
b/gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch
deleted file mode 100644
index 1d7c81b98e6..00000000000
--- a/gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Upstream-status: Taken from 
<https://salsa.debian.org/glibc-team/glibc/-/blob/25a0a47767fe7dc5151eb36afaade17218728efe/debian/patches/hurd-i386/local-static_pthread_setcancelstate.diff>.
-
-This is needed for the 64bit Hurd statically linked tar non to hang when
-issuing a warning.
-
-since the move of libpthread functions to libc, glibc dropped the use
-of __libc_ptf_call. But htl hasn't made the move yet, so we have to use
-__libc_ptf_call there for now.
-
-Index: glibc-2.36/misc/error.c
-===================================================================
---- glibc-2.36.orig/misc/error.c
-+++ glibc-2.36/misc/error.c
-@@ -240,7 +240,8 @@ __error_internal (int status, int errnum
-   /* We do not want this call to be cut short by a thread
-      cancellation.  Therefore disable cancellation for now.  */
-   int state = PTHREAD_CANCEL_ENABLE;
--  __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
-+  __libc_ptf_call (__pthread_setcancelstate,
-+                 (PTHREAD_CANCEL_DISABLE, &state), 0);
- #endif
- 
-   flush_stdout ();
-@@ -262,7 +263,7 @@ __error_internal (int status, int errnum
- 
- #ifdef _LIBC
-   _IO_funlockfile (stderr);
--  __pthread_setcancelstate (state, NULL);
-+  __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
- #endif
- }
- 
-@@ -306,7 +307,9 @@ __error_at_line_internal (int status, in
-   /* We do not want this call to be cut short by a thread
-      cancellation.  Therefore disable cancellation for now.  */
-   int state = PTHREAD_CANCEL_ENABLE;
--  __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
-+  __libc_ptf_call (__pthread_setcancelstate,
-+                 (PTHREAD_CANCEL_DISABLE, &state),
-+                 0);
- #endif
- 
-   flush_stdout ();
-@@ -336,7 +339,7 @@ __error_at_line_internal (int status, in
- 
- #ifdef _LIBC
-   _IO_funlockfile (stderr);
--  __pthread_setcancelstate (state, NULL);
-+  __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
- #endif
- }
- 
-Index: glibc-2.36/libio/iopopen.c
-===================================================================
---- glibc-2.36.orig/libio/iopopen.c
-+++ glibc-2.36/libio/iopopen.c
-@@ -281,9 +281,10 @@ _IO_new_proc_close (FILE *fp)
-   do
-     {
-       int state;
--      __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
-+      __libc_ptf_call (__pthread_setcancelstate,
-+                     (PTHREAD_CANCEL_DISABLE, &state), 0);
-       wait_pid = __waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);
--      __pthread_setcancelstate (state, NULL);
-+      __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
-     }
-   while (wait_pid == -1 && errno == EINTR);
-   if (wait_pid == -1)
-Index: glibc-2.36/stdlib/fmtmsg.c
-===================================================================
---- glibc-2.36.orig/stdlib/fmtmsg.c
-+++ glibc-2.36/stdlib/fmtmsg.c
-@@ -124,7 +124,8 @@ fmtmsg (long int classification, const c
-   /* We do not want this call to be cut short by a thread
-      cancellation.  Therefore disable cancellation for now.  */
-   int state = PTHREAD_CANCEL_ENABLE;
--  __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
-+  __libc_ptf_call (__pthread_setcancelstate,
-+                 (PTHREAD_CANCEL_DISABLE, &state), 0);
- 
-   __libc_lock_lock (lock);
- 
-@@ -193,7 +194,7 @@ fmtmsg (long int classification, const c
- 
-   __libc_lock_unlock (lock);
- 
--  __pthread_setcancelstate (state, NULL);
-+  __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
- 
-   return result;
- }

Reply via email to