diff options
authorSamuel Martin <>2012-07-22 13:28:37 (GMT)
committerThomas Petazzoni <>2012-07-22 18:32:11 (GMT)
commit600375d18e6ccd08505153863666f2e8b10251be (patch)
parent1e75a2d229b42aa8f0e6e0f0f04dc1a34988d996 (diff)
m4: fix build with glibc >=2.16
Signed-off-by: Samuel Martin <> create mode 100644 package/m4/m4-1.4.16-no-gets.patch Signed-off-by: Thomas Petazzoni <>
1 files changed, 38 insertions, 0 deletions
diff --git a/package/m4/m4-1.4.16-no-gets.patch b/package/m4/m4-1.4.16-no-gets.patch
new file mode 100644
index 0000000..a057377
--- /dev/null
+++ b/package/m4/m4-1.4.16-no-gets.patch
@@ -0,0 +1,38 @@
+Since the 2.16 release of the glibc, 'gets' is not any more defined in the gnulib.
+No m4 version synchronized with gnulib since [1] has been released yet.
+This patch avoids the following error occurs when building m4 <=1.4.16 on host using
+a glibc >=2.16:
+make[4]: Entering directory `/opt/buildroot/output/build/host-m4-1.4.16/lib'
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT gl_avltree_oset.o -MD -MP -MF .deps/gl_avltree_oset.Tpo -c -o gl_avltree_oset.o gl_avltree_oset.c
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT c-ctype.o -MD -MP -MF .deps/c-ctype.Tpo -c -o c-ctype.o c-ctype.c
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT c-stack.o -MD -MP -MF .deps/c-stack.Tpo -c -o c-stack.o c-stack.c
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT clean-temp.o -MD -MP -MF .deps/clean-temp.Tpo -c -o clean-temp.o clean-temp.c
+mv -f .deps/c-ctype.Tpo .deps/c-ctype.Po
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -I. -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT close-hook.o -MD -MP -MF .deps/close-hook.Tpo -c -o close-hook.o close-hook.c
+In file included from clean-temp.h:22:0,
+ from clean-temp.c:23:
+./stdio.h:477:20: error 'gets' undeclared here (not in a function)
+make[4]: *** [clean-temp.o] Error 1
+Signed-off-by: Samuel Martin <>
+diff -purN host-m4-1.4.16.orig/lib/ host-m4-1.4.16/lib/
+--- host-m4-1.4.16.orig/lib/ 2012-07-21 19:11:40.196541826 +0200
++++ host-m4-1.4.16/lib/ 2012-07-21 20:46:05.405850751 +0200
+@@ -162,7 +162,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");