aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/bison/bison/remove-gets.patch
blob: 2dfa00fcfaf4e1376742decb0acb1549d78a3f41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
gets has been removed from eglibc 2.16

Signed-off-by: Khem Raj <raj.khem@gmail.com>

Upstream-Status: Pending
Index: bison-2.5/lib/stdio.in.h
===================================================================
--- bison-2.5.orig/lib/stdio.in.h	2012-07-04 09:09:48.336532195 -0700
+++ bison-2.5/lib/stdio.in.h	2012-07-04 09:10:22.868533884 -0700
@@ -180,8 +180,10 @@
 /* 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.  */
+#if defined gets
 #undef gets
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
 
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@