shishi: Fix build

http://hydra.nixos.org/build/3884001
This commit is contained in:
Eelco Dolstra 2013-01-28 13:34:09 +01:00
parent 139cb0d41e
commit 4172cbee05
2 changed files with 29 additions and 7 deletions

View File

@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "13c6w9rpaqb3am65nrn86byvmll5r78pld2vb0i68491vww4fzlx";
};
patches = [ ./no-gets.patch ];
buildInputs = [ libtasn1 libgcrypt gnutls ] ;
doCheck = true;

View File

@ -0,0 +1,20 @@
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 06d9780..fa04a10 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -713,10 +713,13 @@ _GL_CXXALIAS_SYS (gets, char *, (char *s));
# endif
_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. */
+ so any use of gets warrants an unconditional warning; besides C11
+ removed it. */
+#ifdef gets
+#undef gets
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
+#endif
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@