[packages/libiconv] patch to support glibc-2.16+ (dropped gets function)

glen glen at pld-linux.org
Tue Jun 18 12:57:26 CEST 2013


commit 2ebb06a7ff24037ae2130c1ef10883e43b2c2514
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Jun 18 13:56:23 2013 +0300

    patch to support glibc-2.16+ (dropped gets function)
    
    downloaded from:
    http://oe-lite.org/redmine/projects/base/repository/revisions/9672ff4ed0a4cfd731f5c24d8fad277901788847/raw/recipes/libiconv/files/gets-undefined-in-C11.patch

 gets-undefined-in-C11.patch | 28 ++++++++++++++++++++++++++++
 libiconv.spec               |  2 ++
 2 files changed, 30 insertions(+)
---
diff --git a/libiconv.spec b/libiconv.spec
index 4611743..333081c 100644
--- a/libiconv.spec
+++ b/libiconv.spec
@@ -8,6 +8,7 @@ Group:		Libraries
 Source0:	http://ftp.gnu.org/gnu/libiconv/%{name}-%{version}.tar.gz
 # Source0-md5:	e34509b1623cec449dfeb73d7ce9c6c6
 Patch0:		%{name}-pl.po-update.patch
+Patch1:		gets-undefined-in-C11.patch
 URL:		http://www.gnu.org/software/libiconv/
 BuildRequires:	autoconf >= 2.60
 BuildRequires:	automake
@@ -70,6 +71,7 @@ Narzędzie iconv.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %{__rm} po/stamp-po
 
diff --git a/gets-undefined-in-C11.patch b/gets-undefined-in-C11.patch
new file mode 100644
index 0000000..a1e127a
--- /dev/null
+++ b/gets-undefined-in-C11.patch
@@ -0,0 +1,28 @@
+--- libiconv-1.14.orig/srclib/stdio.in.h	2011-08-07 13:42:06.000000000 +0000
++++ libiconv-1.14/srclib/stdio.in.h	2013-01-09 19:56:21.115819812 +0000
+@@ -680,22 +680,7 @@
+ #endif
+ 
+ #if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+-/* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#undef gets
+ #endif
+ 
+ 
+
+Diff finished.  Wed Jan  9 19:56:44 2013
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libiconv.git/commitdiff/2ebb06a7ff24037ae2130c1ef10883e43b2c2514



More information about the pld-cvs-commit mailing list