diff --git a/autogen-overlap.patch b/autogen-overlap.patch new file mode 100644 index 0000000..37aefeb --- /dev/null +++ b/autogen-overlap.patch @@ -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; + } diff --git a/autogen.spec b/autogen.spec index 3db8b51..29130a6 100644 --- a/autogen.spec +++ b/autogen.spec @@ -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