fix building with new gcc

This commit is contained in:
Miroslav Lichvar 2019-02-05 12:52:34 +01:00
parent 2d0810aa1f
commit 487074c88e
2 changed files with 15 additions and 0 deletions

12
autogen-overlap.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up autogen-5.18.16/compat/pathfind.c.orig autogen-5.18.16/compat/pathfind.c
--- autogen-5.18.16/compat/pathfind.c.orig 2018-07-25 21:44:31.000000000 +0200
+++ autogen-5.18.16/compat/pathfind.c 2019-02-05 12:39:02.625001009 +0100
@@ -211,7 +211,7 @@ canonicalize_pathname( char *path )
(result[i + 2] == '/' || !result[i + 2])) {
while (--start > -1 && result[start] != '/')
;
- strcpy( result + start + 1, result + i + 2 );
+ memmove( result + start + 1, result + i + 2, strlen(result + i + 2) + 1 );
i = (start < 0) ? 0 : start;
continue;
}

View File

@ -10,6 +10,8 @@ Source0: ftp://ftp.gnu.org/gnu/autogen/rel%{version}/%{name}-%{version}.tar.xz
# Fix multilib conflicts
Patch0: autogen-multilib.patch
# Fix gcc error on overlapping strings
Patch1: autogen-overlap.patch
Requires: %{name}-libopts%{?_isa} = %{version}-%{release}
@ -54,6 +56,7 @@ This package contains development files for libopts.
%prep
%setup -q
%patch0 -p1 -b .multilib
%patch1 -p1 -b .overlap
# Disable failing test
sed -i 's|errors.test||' autoopts/test/Makefile.in