mailutils: Fix build

http://hydra.nixos.org/build/3875816
This commit is contained in:
Eelco Dolstra 2013-01-28 14:26:31 +01:00
parent 84adcc2241
commit 4718d430cc
2 changed files with 15 additions and 1 deletions

View file

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65";
};
patches = [ ./path-to-cat.patch ];
patches = [ ./path-to-cat.patch ./no-gets.patch ];
buildInputs =
[ gettext gdbm libtool pam readline ncurses

View file

@ -0,0 +1,14 @@
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -138,8 +138,10 @@
/* 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. */
-#undef gets
+#ifdef gets
+# undef gets
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@