[packages/perl-threads] fix build with perl 5.40.x
atler
atler at pld-linux.org
Mon Jul 1 21:27:39 CEST 2024
commit 3fff3ee8eba5b8a43ee038535c204ad586c3a863
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Jul 1 21:16:45 2024 +0200
fix build with perl 5.40.x
PL_no_mem no longer available
perl-threads.spec | 2 ++
perl5.40.patch | 12 ++++++++++++
2 files changed, 14 insertions(+)
---
diff --git a/perl-threads.spec b/perl-threads.spec
index a89c4cb..da55867 100644
--- a/perl-threads.spec
+++ b/perl-threads.spec
@@ -12,6 +12,7 @@ License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-authors/id/J/JD/JDHEDDEN/threads-%{version}.tar.gz
# Source0-md5: 45fa009703074f0b0b0d036cb23706e3
+Patch0: perl5.40.patch
URL: http://search.cpan.org/dist/threads/
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
@@ -25,6 +26,7 @@ being shared between threads.
%prep
%setup -q -n %{pdir}-%{version}
+%patch0 -p1
%build
%{__perl} Makefile.PL \
diff --git a/perl5.40.patch b/perl5.40.patch
new file mode 100644
index 0000000..8f55bf4
--- /dev/null
+++ b/perl5.40.patch
@@ -0,0 +1,12 @@
+--- threads-2.21/threads.xs.orig 2018-01-23 02:10:14.000000000 +0100
++++ threads-2.21/threads.xs 2024-07-01 21:07:39.076104230 +0200
+@@ -770,7 +770,8 @@
+ int fd = PerlIO_fileno(Perl_error_log);
+ if (fd >= 0) {
+ /* If there's no error_log, we cannot scream about it missing. */
+- PERL_UNUSED_RESULT(PerlLIO_write(fd, PL_no_mem, strlen(PL_no_mem)));
++ static const char oomp[] = "Out of memory in perl:threads:ithread_create\n";
++ PERL_UNUSED_RESULT(PerlLIO_write(fd, oomp, sizeof oomp - 1));
+ }
+ }
+ my_exit(1);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-threads.git/commitdiff/3fff3ee8eba5b8a43ee038535c204ad586c3a863
More information about the pld-cvs-commit
mailing list