From 5169e77e2461bfbf6c03b981dbfed43f86fe7a3f Mon Sep 17 00:00:00 2001 From: chen-jan Date: Mon, 7 Aug 2023 16:59:03 +0800 Subject: [PATCH] stop using do_open9 --- mod_perl-2.0.12-Stop-using-do_open9.patch | 14 ++++++++++++++ mod_perl.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 mod_perl-2.0.12-Stop-using-do_open9.patch diff --git a/mod_perl-2.0.12-Stop-using-do_open9.patch b/mod_perl-2.0.12-Stop-using-do_open9.patch new file mode 100644 index 0000000..8e606a1 --- /dev/null +++ b/mod_perl-2.0.12-Stop-using-do_open9.patch @@ -0,0 +1,14 @@ +diff -up mod_perl-2.0.12/src/modules/perl/modperl_io.c.orig mod_perl-2.0.12/src/modules/perl/modperl_io.c +--- mod_perl-2.0.12/src/modules/perl/modperl_io.c.orig 2023-06-01 12:34:06.696214838 +0200 ++++ mod_perl-2.0.12/src/modules/perl/modperl_io.c 2023-06-01 12:33:22.802841353 +0200 +@@ -116,8 +116,8 @@ modperl_io_perlio_override_stdhandle(pTH + save_gp(handle, 1); + + sv_setref_pv(sv, "Apache2::RequestRec", (void*)r); +- status = do_open9(handle, mode == O_RDONLY ? "<:Apache2" : ">:Apache2", +- 9, FALSE, mode, 0, (PerlIO *)NULL, sv, 1); ++ status = do_openn(handle, mode == O_RDONLY ? "<:Apache2" : ">:Apache2", ++ 9, FALSE, mode, 0, (PerlIO *)NULL, &sv, 1); + if (status == 0) { + Perl_croak(aTHX_ "Failed to open STD%s: %" SVf, + mode == O_RDONLY ? "IN" : "OUT", get_sv("!", TRUE)); diff --git a/mod_perl.spec b/mod_perl.spec index 1c4f13a..9b90986 100644 --- a/mod_perl.spec +++ b/mod_perl.spec @@ -14,7 +14,7 @@ Name: mod_perl Version: 2.0.12 -Release: 1 +Release: 2 Summary: An embedded Perl interpreter for the Apache HTTP Server # other files: ASL 2.0 ## Not in binary packages @@ -32,6 +32,7 @@ Patch0: mod_perl-2.0.12-Convert-documentation-to-UTF-8.patch Patch1: mod_perl-2.0.4-inline.patch # Do not use deprecated ap_get_server_version(), CPAN RT#124972 Patch2: mod_perl-2.0.11-Do-not-use-deprecated-ap_get_server_version-in-Serve.patch +Patch3: mod_perl-2.0.12-Stop-using-do_open9.patch BuildRequires: apr-devel >= 1.2.0 BuildRequires: apr-util-devel BuildRequires: coreutils @@ -180,6 +181,7 @@ This mod_perl extension allows to reload Perl modules that changed on the disk. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # Remove docs/os. It's only win32 info with non-ASL-2.0 license. Bug #1199044. rm -rf docs/os # Remove bundled Apache-Reload @@ -313,5 +315,8 @@ fi %changelog +* Mon Aug 07 2023 chenchen - 2.0.12-2 +- stop using do_open9 + * Wed Mar 22 2023 Yikun Jiang - 2.0.12-1 - 2.0.12 version