From 47bc586a897fd9f52456537706c6b9dedb1fbedb Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Jan 29 2018 18:00:24 +0000 Subject: Fix FTBFS in test/teststr.c with GCC 8 (#1539844) --- diff --git a/apr-rh1539844.patch b/apr-rh1539844.patch new file mode 100644 index 0000000..15178af --- /dev/null +++ b/apr-rh1539844.patch @@ -0,0 +1,20 @@ +diff -ur apr-1.6.3.orig/test/teststr.c apr-1.6.3/test/teststr.c +--- apr-1.6.3.orig/test/teststr.c 2016-03-03 17:11:16.000000000 +0100 ++++ apr-1.6.3/test/teststr.c 2018-01-29 18:54:44.748931098 +0100 +@@ -307,10 +307,15 @@ + for (; off < 999999999; off += 999) { + apr_strfsize(off, buf); + } +- for (off = 1; off < LONG_MAX && off > 0; off *= 2) { ++ ++ off = 1; ++ while (1) { + apr_strfsize(off, buf); + apr_strfsize(off + 1, buf); + apr_strfsize(off - 1, buf); ++ if (off > LONG_MAX / 2) ++ break; ++ off *= 2; + } + + ABTS_ASSERT(tc, "strfsize overflowed", buf[5] == '$'); diff --git a/apr.spec b/apr.spec index ff58e5e..420360d 100644 --- a/apr.spec +++ b/apr.spec @@ -6,7 +6,7 @@ Summary: Apache Portable Runtime library Name: apr Version: 1.6.3 -Release: 3%{?dist} +Release: 4%{?dist} # ASL 2.0: everything # ISC: network_io/apr-1.4.6/network_io/unix/inet_?to?.c # BSD with advertising: strings/apr_snprintf.c, strings/apr_fnmatch.c, @@ -21,6 +21,7 @@ Source1: apr-wrapper.h Patch2: apr-1.2.2-locktimeout.patch Patch3: apr-1.2.2-libdir.patch Patch4: apr-1.2.7-pkgconf.patch +Patch5: apr-rh1539844.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: autoconf, libtool, libuuid-devel, python # To enable SCTP support @@ -49,6 +50,7 @@ C data structures and routines. %patch2 -p1 -b .locktimeout %patch3 -p1 -b .libdir %patch4 -p1 -b .pkgconf +%patch5 -p1 -b .rh1539844 %build # regenerate configure script etc. @@ -133,6 +135,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/aclocal/*.m4 %changelog +* Mon Jan 29 2018 Florian Weimer - 1.6.3-4 +- Fix FTBFS in test/teststr.c with GCC 8 (#1539844) + * Mon Jan 29 2018 Florian Weimer - 1.6.3-3 - Rebuild with new redhat-rpm-config build flags