From 006c7c854a95db3497b61c3f80ba58ed29ed5d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 1 Sep 2011 17:38:55 +0000 Subject: [PATCH] Adding a patch for libxcrypt that could make it build for gcc 4.6. Untested; I only looked at the hydra log. svn path=/nixpkgs/branches/stdenv-updates/; revision=28961 --- .../libraries/libxcrypt/default.nix | 3 +++ .../libraries/libxcrypt/gcc46.patch | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/development/libraries/libxcrypt/gcc46.patch diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index aea9e53eef6e..b2c9a2c9cf5b 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -11,4 +11,7 @@ stdenv.mkDerivation { url = ftp://ftp.suse.com/pub/people/kukuk/libxcrypt/libxcrypt-3.0.2.tar.bz2; sha256 = "15l2xvhi3r3b40x4665c101ikylh5xsbpw03gnszypfjgn1jkcii"; }; + + patches = [ ./gcc46.patch ]; + } diff --git a/pkgs/development/libraries/libxcrypt/gcc46.patch b/pkgs/development/libraries/libxcrypt/gcc46.patch new file mode 100644 index 000000000000..0664f96aa688 --- /dev/null +++ b/pkgs/development/libraries/libxcrypt/gcc46.patch @@ -0,0 +1,18 @@ +For gcc 4.6 to build this. Otherwise it says 's unused variable', and it's built +with -Werror. + +diff --git a/src/cert.c b/src/cert.c +index 28c7b11..34570a4 100644 +--- a/src/cert.c ++++ b/src/cert.c +@@ -87,9 +87,7 @@ char *cp; + int i,j,t; + + for(i=0;i<8;i++){ +- int s; +- +- s = scanf("%2x",&t); ++ scanf("%2x",&t); + if(feof(stdin)) + good_bye(); + for(j=0; j<8 ; j++) {