gnu: upower: Enable GObject introspection.
[jackhill/guix/guix.git] / gnu / packages / patches / cpio-gets-undeclared.patch
CommitLineData
501b1675
NK
1This patch is needed to allow builds with newer versions of
2the GNU libc (2.16+).
3
4The upstream fix was:
5
6 commit 66712c23388e93e5c518ebc8515140fa0c807348
7 Author: Eric Blake <eblake@redhat.com>
8 Date: Thu Mar 29 13:30:41 2012 -0600
9
10 stdio: don't assume gets any more
11
12 Gnulib intentionally does not have a gets module, and now that C11
13 and glibc have dropped it, we should be more proactive about warning
14 any user on a platform that still has a declaration of this dangerous
15 interface.
16
17 * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
18 support.
19 * modules/stdio (Makefile.am): Likewise.
20 * lib/stdio-read.c (gets): Likewise.
21 * tests/test-stdio-c++.cc: Likewise.
22 * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
23 * lib/stdio.in.h (gets): Make warning occur in more places.
24 * doc/posix-functions/gets.texi (gets): Update documentation.
25 Reported by Christer Solskogen.
26
27 Signed-off-by: Eric Blake <eblake@redhat.com>
28
29This patch just gets rid of the offending part.
30
31--- cpio-2.11/gnu/stdio.in.h-orig 2012-11-25 22:17:06.000000000 +0400
32+++ cpio-2.11/gnu/stdio.in.h 2012-11-25 22:18:36.000000000 +0400
33@@ -135,12 +135,6 @@
34 "use gnulib module fflush for portable POSIX compliance");
35 #endif
36
37-/* It is very rare that the developer ever has full control of stdin,
38- so any use of gets warrants an unconditional warning. Assume it is
39- always declared, since it is required by C89. */
40-#undef gets
41-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
42-
43 #if @GNULIB_FOPEN@
44 # if @REPLACE_FOPEN@
45 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)