Accepting request 133232 from devel:tools

- patch-stdio.in.patch:
   Fix build with missing gets declaration (glibc 2.16)

OBS-URL: https://build.opensuse.org/request/show/133232
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/patch?expand=0&rev=32
This commit is contained in:
Stephan Kulow 2012-09-13 05:07:24 +00:00 committed by Git OBS Bridge
commit 5e8bb3b532
3 changed files with 26 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,9 @@
-------------------------------------------------------------------
Tue Jul 17 08:40:27 UTC 2012 - aj@suse.de
- patch-stdio.in.patch:
Fix build with missing gets declaration (glibc 2.16)
-------------------------------------------------------------------
Fri Apr 6 14:22:12 CEST 2012 - jdelvare@suse.de

View File

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