app-editors/zile: Fix build failure with glibc-2.16.
authorUlrich Müller <ulm@gentoo.org>
Sat, 1 Jul 2017 08:25:39 +0000 (10:25 +0200)
committerUlrich Müller <ulm@gentoo.org>
Sat, 1 Jul 2017 08:35:11 +0000 (10:35 +0200)
Bug: 623218
Package-Manager: Portage-2.3.6, Repoman-2.3.2

app-editors/zile/files/zile-2.3.24-gets.patch [new file with mode: 0644]
app-editors/zile/zile-2.3.24-r1.ebuild

diff --git a/app-editors/zile/files/zile-2.3.24-gets.patch b/app-editors/zile/files/zile-2.3.24-gets.patch
new file mode 100644 (file)
index 0000000..9060c4b
--- /dev/null
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/623218
+Backported from gnulib in zile-2.4.11.
+
+--- zile-2.3.24-orig/lib/stdio.in.h
++++ zile-2.3.24/lib/stdio.in.h
+@@ -717,22 +717,11 @@
+ # endif
+ #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.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
index ebbf29d399460e7882c57e2e1d6460cd35f33114..a826b16dc353ce5cbd07096770ed68e27e217f40 100644 (file)
@@ -20,6 +20,7 @@ DEPEND="${RDEPEND}
 
 src_prepare() {
        epatch "${FILESDIR}/${P}-userhome.patch"
+       epatch "${FILESDIR}/${P}-gets.patch"
 }
 
 src_configure() {