diff --git a/apache2-mod_perl.changes b/apache2-mod_perl.changes index 7d1d6c2..5a52fbb 100644 --- a/apache2-mod_perl.changes +++ b/apache2-mod_perl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 27 16:39:34 UTC 2021 - Dirk Stoecker + +- fix build error with fix_perl_5.34_build.patch + ------------------------------------------------------------------- Thu Feb 13 08:03:41 UTC 2020 - pgajdos@suse.com diff --git a/apache2-mod_perl.spec b/apache2-mod_perl.spec index 278b285..c0e7516 100644 --- a/apache2-mod_perl.spec +++ b/apache2-mod_perl.spec @@ -1,7 +1,7 @@ # # spec file for package apache2-mod_perl # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,8 @@ Source2: https://www.apache.org/dist/perl/KEYS#/%{name}.keyring Patch1: avoid-broken-provides.diff # bsc#1091625, workaround, according to mls it should be solved in perl Patch2: apache2-mod_perl-prctl-short-name.patch +# PATCH-FIX-UPSTREAM fix build error caused by new error checking in perl 5.34.0 +Patch3: fix_perl_5.34_build.patch BuildRequires: apache-rpm-macros BuildRequires: apache2-devel BuildRequires: db-devel @@ -84,6 +86,7 @@ software depending on apache2-mod_perl. %setup -q -n %{srcname}-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build perl Makefile.PL INSTALLDIRS=vendor MP_APXS=%{apache_apxs} MP_APR_CONFIG=%{_bindir}/apr-1-config MP_CCOPTS="%{apache_cflags} -fgnu89-inline" diff --git a/fix_perl_5.34_build.patch b/fix_perl_5.34_build.patch new file mode 100644 index 0000000..9d40f2e --- /dev/null +++ b/fix_perl_5.34_build.patch @@ -0,0 +1,24 @@ +diff -ur mod_perl-2.0.11/src/modules/perl/modperl_perl.c mod_perl-2.0.11_fix/src/modules/perl/modperl_perl.c +--- mod_perl-2.0.11/src/modules/perl/modperl_perl.c 2019-10-05 13:04:42.000000000 +0200 ++++ mod_perl-2.0.11_fix/src/modules/perl/modperl_perl.c 2021-09-27 18:45:52.566005007 +0200 +@@ -268,7 +268,7 @@ + #ifdef MP_NEED_HASH_SEED_FIXUP + if (MP_init_hash_seed_set) { + #if MP_PERL_VERSION_AT_LEAST(5, 17, 6) +- memcpy(&PL_hash_seed, &MP_init_hash_seed, ++ memcpy(PL_hash_seed, &MP_init_hash_seed, + sizeof(PL_hash_seed) > sizeof(MP_init_hash_seed) ? + sizeof(MP_init_hash_seed) : sizeof(PL_hash_seed)); + PL_hash_seed_set = MP_init_hash_seed_set; +diff -ur mod_perl-2.0.11/src/modules/perl/modperl_util.c mod_perl-2.0.11_fix/src/modules/perl/modperl_util.c +--- mod_perl-2.0.11/src/modules/perl/modperl_util.c 2019-10-05 13:04:43.000000000 +0200 ++++ mod_perl-2.0.11_fix/src/modules/perl/modperl_util.c 2021-09-27 18:38:17.156578770 +0200 +@@ -632,7 +632,7 @@ + + if (r->finfo.size != size) { + SvREFCNT_dec(sv); +- Perl_croak(aTHX_ "Error: read %d bytes, expected %d ('%s')", ++ Perl_croak(aTHX_ "Error: read %ld bytes, expected %ld ('%s')", + size, (apr_size_t)r->finfo.size, r->filename); + } +