Skip to content

Instantly share code, notes, and snippets.

@valkjsaaa
Last active November 7, 2016 02:56
Show Gist options
  • Select an option

  • Save valkjsaaa/b715fd8c2596780ebd00eced2b2d63af to your computer and use it in GitHub Desktop.

Select an option

Save valkjsaaa/b715fd8c2596780ebd00eced2b2d63af to your computer and use it in GitHub Desktop.
Patch to compile libiconv in older glibc
--- a/srclib/stdio.in.h
+++ b/srclib/stdio.in.h
@@ -695,7 +695,9 @@ _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. */
+# 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