Accepting request 128103 from home:a_jaeger:FactoryFix

Fix build with missing gets declaration (glibc 2.16)

OBS-URL: https://build.opensuse.org/request/show/128103
OBS-URL: https://build.opensuse.org/package/show/devel:tools/patch?expand=0&rev=32
This commit is contained in:
Dirk Mueller 2012-08-07 07:30:43 +00:00 committed by Git OBS Bridge
parent 0a622f8d7f
commit d6b22c081d
3 changed files with 25 additions and 6 deletions

14
patch-stdio.in.patch Normal file
View File

@ -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@

View File

@ -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 Fri Apr 6 14:22:12 CEST 2012 - jdelvare@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package patch # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,23 +15,22 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
Url: ftp://alpha.gnu.org/gnu/diffutils/ Url: ftp://alpha.gnu.org/gnu/diffutils/
%define hash -31a7 %define hash -31a7
Name: patch 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 # See bnc#662957. The fix for CVE-2010-4651 breaks the way interdiff was
# invoking patch, so interdiff had to be fixed too. # invoking patch, so interdiff had to be fixed too.
Conflicts: patchutils < 0.3.2 Conflicts: patchutils < 0.3.2
Version: 2.6.1.136 Version: 2.6.1.136
Release: 1 Release: 0
Summary: GNU patch Summary: GNU patch
License: GPL-3.0+
Group: Productivity/Text/Utilities
Source: ftp://alpha.gnu.org/gnu/patch/patch-%version%hash.tar.bz2 Source: ftp://alpha.gnu.org/gnu/patch/patch-%version%hash.tar.bz2
Patch1: patch-revert-e0f70752.patch Patch1: patch-revert-e0f70752.patch
Patch2: patch-stdio.in.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -48,6 +47,7 @@ Authors:
%prep %prep
%setup -q -n patch-%version%hash %setup -q -n patch-%version%hash
%patch1 -p1 %patch1 -p1
%patch2 -p1
%build %build
export CFLAGS="$RPM_OPT_FLAGS -Wall -O2 -pipe" export CFLAGS="$RPM_OPT_FLAGS -Wall -O2 -pipe"