diff --git a/patch-stdio.in.patch b/patch-stdio.in.patch new file mode 100644 index 0000000..d08e286 --- /dev/null +++ b/patch-stdio.in.patch @@ -0,0 +1,14 @@ +Index: patch-2.6.1.136-31a7/lib/stdio.in.h +=================================================================== +--- patch-2.6.1.136-31a7.orig/lib/stdio.in.h ++++ patch-2.6.1.136-31a7/lib/stdio.in.h +@@ -164,7 +164,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ + #undef gets ++#if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/patch.changes b/patch.changes index 23c57bd..b9ed7d4 100644 --- a/patch.changes +++ b/patch.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 17 08:40:27 UTC 2012 - aj@suse.de + +- Fix build with missing gets declaration (glibc 2.16) + ------------------------------------------------------------------- Fri Apr 6 14:22:12 CEST 2012 - jdelvare@suse.de diff --git a/patch.spec b/patch.spec index 77442d9..8ac3e05 100644 --- a/patch.spec +++ b/patch.spec @@ -1,7 +1,7 @@ # # spec file for package patch # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,23 +15,22 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Url: ftp://alpha.gnu.org/gnu/diffutils/ %define hash -31a7 Name: patch -License: GPL-3.0+ -Group: Productivity/Text/Utilities -AutoReqProv: on # See bnc#662957. The fix for CVE-2010-4651 breaks the way interdiff was # invoking patch, so interdiff had to be fixed too. Conflicts: patchutils < 0.3.2 Version: 2.6.1.136 -Release: 1 +Release: 0 Summary: GNU patch +License: GPL-3.0+ +Group: Productivity/Text/Utilities Source: ftp://alpha.gnu.org/gnu/patch/patch-%version%hash.tar.bz2 Patch1: patch-revert-e0f70752.patch +Patch2: patch-stdio.in.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -48,6 +47,7 @@ Authors: %prep %setup -q -n patch-%version%hash %patch1 -p1 +%patch2 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -Wall -O2 -pipe"