Skip to content

Instantly share code, notes, and snippets.

@draekko
Forked from paulczar/gist:5493708
Created November 15, 2015 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save draekko/14683a211a896bd3b556 to your computer and use it in GitHub Desktop.
Save draekko/14683a211a896bd3b556 to your computer and use it in GitHub Desktop.
Patch to fix libiconv for glibc >= 2.16 - originally found at http://www.itkb.ro/kb/linux/patch-libiconv-pentru-glibc-216
--- srclib/stdio.in.h.orig 2011-08-07 16:42:06.000000000 +0300
+++ srclib/stdio.in.h 2013-01-10 15:53:03.000000000 +0200
@@ -695,7 +695,9 @@
/* 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");
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment