public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-Coro-Multicore] rawhide: Rename atfork_child to coro_atfork_child to avoid collision with perl 5.43.2+
@ 2026-07-23 16:13 Jitka Plesnikova
  0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-07-23 16:13 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/perl-Coro-Multicore
Branch : rawhide
Commit : cb5e558206b54ff6b5e108a2aafd10bd1013a043
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2026-07-23T18:08:39+02:00
Stats  : +48/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-Coro-Multicore/c/cb5e558206b54ff6b5e108a2aafd10bd1013a043?branch=rawhide

Log:
Rename atfork_child to coro_atfork_child to avoid collision with perl 5.43.2+

---
diff --git a/Coro-Multicore-1.07-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch b/Coro-Multicore-1.07-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch
new file mode 100644
index 0000000..ce11de4
--- /dev/null
+++ b/Coro-Multicore-1.07-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch
@@ -0,0 +1,45 @@
+From f1c62a366442f554c264aeed38b10a64ca5a6378 Mon Sep 17 00:00:00 2001
+From: Jitka Plesnikova <jplesnik@redhat.com>
+Date: Thu, 23 Jul 2026 17:58:32 +0200
+Subject: [PATCH] Rename atfork_child to coro_atfork_child to avoid collision
+ with perl 5.43.2+
+
+Perl 5.43.2 introduced Perl_atfork_child() as a new API function and
+added a macro `atfork_child -> Perl_atfork_child` in embed.h. This
+causes a build failure because Multicore.xs defines its own static
+atfork_child() function, which after macro expansion becomes a static
+redeclaration of the non-static Perl_atfork_child.
+
+Rename the local function to coro_atfork_child to avoid the name
+collision.
+
+Petr Pisar: Clean up the patch.
+---
+ Multicore.xs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Multicore.xs b/Multicore.xs
+index 01a6800..83e6b2c 100644
+--- a/Multicore.xs
++++ b/Multicore.xs
+@@ -298,7 +298,7 @@ set_thread_enable (pTHX_ void *arg)
+ }
+ 
+ static void
+-atfork_child (void)
++coro_atfork_child (void)
+ {
+   s_epipe_renew (&ep);
+ }
+@@ -321,7 +321,7 @@ BOOT:
+         if (s_epipe_new (&ep))
+           croak ("Coro::Multicore: unable to initialise event pipe.\n");
+ 
+-        pthread_atfork (0, 0, atfork_child);
++        pthread_atfork (0, 0, coro_atfork_child);
+ 
+         perl_thx = PERL_GET_CONTEXT;
+ 
+-- 
+2.55.0
+

diff --git a/perl-Coro-Multicore.spec b/perl-Coro-Multicore.spec
index 7f5ba4a..875a074 100644
--- a/perl-Coro-Multicore.spec
+++ b/perl-Coro-Multicore.spec
@@ -21,6 +21,9 @@ Patch0:         Coro-Multicore-0.02-Declare-POD-encoding.patch
 # 1.05 provided a fix, but forgot to return a value from thread_proc().
 # Keep the patch until upstream resolves it.
 Patch1:         Coro-Multicore-1.04-Fix-passing-context.patch
+# Rename atfork_child to coro_atfork_child to avoid collision with perl
+# 5.43.2+, bug #2506490, CPAN RT#180241, proposed upstream
+Patch2:         Coro-Multicore-1.07-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch
 BuildRequires:  coreutils
 BuildRequires:  perl-podlators
 %if %{with perl_Coro_Multicore_enables_coro}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-23 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23 16:13 [rpms/perl-Coro-Multicore] rawhide: Rename atfork_child to coro_atfork_child to avoid collision with perl 5.43.2+ Jitka Plesnikova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox