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

A new commit has been pushed.

Repo   : rpms/perl-BDB
Branch : rawhide
Commit : 823b801aaebee5c4b2c067d235079a175703a6c9
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2026-06-10T08:23:11+02:00
Stats  : +46/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-BDB/c/823b801aaebee5c4b2c067d235079a175703a6c9?branch=rawhide

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

---
diff --git a/BDB-1.92-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch b/BDB-1.92-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch
new file mode 100644
index 0000000..84dad46
--- /dev/null
+++ b/BDB-1.92-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch
@@ -0,0 +1,39 @@
+From: Jitka Plesnikova <jplesnik@redhat.com>
+Co-authored-by: Claude Opus 4.6 (Anthropic AI)
+Subject: Rename atfork_child to bdb_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 BDB.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 bdb_atfork_child to avoid the name
+collision.
+
+diff --git a/BDB.xs b/BDB.xs
+index 2424cc1..11c8b9e 100644
+--- a/BDB.xs
++++ b/BDB.xs
+@@ -986,7 +986,11 @@ static void atfork_parent (void)
+   X_UNLOCK (wrklock);
+ }
+
+-static void atfork_child (void)
++/* Perl 5.43.2+ defines atfork_child as a macro expanding to
++ * Perl_atfork_child. Use a different name to avoid the collision.
++ */
++#undef atfork_child
++static void bdb_atfork_child (void)
+ {
+   bdb_req prv;
+
+@@ -1441,7 +1445,7 @@ BOOT:
+
+         create_respipe ();
+
+-        X_THREAD_ATFORK (atfork_prepare, atfork_parent, atfork_child);
++        X_THREAD_ATFORK (atfork_prepare, atfork_parent, bdb_atfork_child);
+         patch_errno ();
+ }
+

diff --git a/perl-BDB.spec b/perl-BDB.spec
index 5021d1f..df30802 100644
--- a/perl-BDB.spec
+++ b/perl-BDB.spec
@@ -3,11 +3,13 @@
 Name:           perl-BDB
 # Extend to 2 digits to get higher RPM package version than 1.88
 Version:        %{cpan_version}
-Release:        29%{?dist}
+Release:        30%{?dist}
 Summary:        Asynchronous Berkeley DB access
 License:        GPL-1.0-or-later OR Artistic-1.0-Perl
 URL:            https://metacpan.org/release/BDB
 Source0:        https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/BDB-%{cpan_version}.tar.gz
+# Rename atfork_child to bdb_atfork_child to avoid collision with perl 5.43.2+
+Patch0:         BDB-1.92-Rename-atfork_child-to-avoid-collision-with-perl-5.43.2.patch
 BuildRequires:  findutils
 BuildRequires:  gcc
 BuildRequires:  libdb-devel
@@ -32,6 +34,7 @@ Asynchronous Berkeley DB access.
 
 %prep
 %setup -qn BDB-%{cpan_version}
+%patch -P0 -p1
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1
@@ -53,6 +56,9 @@ make test
 %{_mandir}/man3/*.3*
 
 %changelog
+* Mon Jun 08 2026 Jitka Plesnikova <jplesnik@redhat.com> - 1.92-30
+- Rename atfork_child to bdb_atfork_child to avoid collision with perl 5.43.2+
+
 * Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.92-29
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

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

only message in thread, other threads:[~2026-06-11 11:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-11 11:13 [rpms/perl-BDB] rawhide: Rename atfork_child to bdb_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