Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/2] diffutils: fix build with recent glibc
@ 2012-12-28 20:41 Thomas Petazzoni
  2012-12-28 21:47 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2012-12-28 20:41 UTC (permalink / raw)
  To: buildroot

Fixes the following build problem with recent toolchains:

In file included from exclude.c:31:0:
./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)
  CC       hard-locale.o
make[4]: *** [exclude.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from stdio-safer.h:20:0,
                 from freopen-safer.c:22:
./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...tils-gets-no-longer-exists-in-eglibc-2.16.patch |   26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch

diff --git a/package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch b/package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch
new file mode 100644
index 0000000..4785718
--- /dev/null
+++ b/package/diffutils/diffutils-gets-no-longer-exists-in-eglibc-2.16.patch
@@ -0,0 +1,26 @@
+Handle the fact that gets() no longer exists in glibc >= 2.16
+
+The problem has been fixed upstream, but no release containing the fix
+has been made so far.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/lib/stdio.in.h
+===================================================================
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -693,12 +693,14 @@
+ _GL_CXXALIAS_SYS (gets, char *, (char *s));
+ #  undef gets
+ # endif
++# if defined gets
+ _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");
+ #endif
++#endif
+ 
+ 
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 2/2] diffutils: fix build with recent glibc
  2012-12-28 20:41 [Buildroot] [PATCH 2/2] diffutils: fix build with recent glibc Thomas Petazzoni
@ 2012-12-28 21:47 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2012-12-28 21:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Fixes the following build problem with recent toolchains:
 Thomas> In file included from exclude.c:31:0:
 Thomas> ./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)
 Thomas>   CC       hard-locale.o
 Thomas> make[4]: *** [exclude.o] Error 1
 Thomas> make[4]: *** Waiting for unfinished jobs....
 Thomas> In file included from stdio-safer.h:20:0,
 Thomas>                  from freopen-safer.c:22:
 Thomas> ./stdio.h:1012:1: error: 'gets' undeclared here (not in a function)

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-28 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 20:41 [Buildroot] [PATCH 2/2] diffutils: fix build with recent glibc Thomas Petazzoni
2012-12-28 21:47 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox