summary refs log tree commit diff
path: root/pkgs/tools/text/gnugrep
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-08-01 21:17:29 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-08-01 21:17:29 +0000
commit2954596106c5d6e96c9f121573a05baf4bc8630d (patch)
treee645e73ae2aacea068962ee442ba1cc938f100ff /pkgs/tools/text/gnugrep
parentfbad1b3a56c4885702739d89b9b80397c5f6d512 (diff)
Making gnugrep cross-build for mips
svn path=/nixpkgs/branches/stdenv-updates/; revision=22847
Diffstat (limited to 'pkgs/tools/text/gnugrep')
-rw-r--r--pkgs/tools/text/gnugrep/default.nix2
-rw-r--r--pkgs/tools/text/gnugrep/malloc.patch15
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix
index 17d69404e0c7d..1cd73a8814ce6 100644
--- a/pkgs/tools/text/gnugrep/default.nix
+++ b/pkgs/tools/text/gnugrep/default.nix
@@ -5,6 +5,8 @@ let version = "2.6.3"; in
 stdenv.mkDerivation {
   name = "gnugrep-${version}";
   
+  patches = [ ./malloc.patch ];
+  
   src = fetchurl {
     url = "mirror://gnu/grep/grep-${version}.tar.gz";
     sha256 = "0rnnljzcpb2sl5zabww7gbzk9r6kp8kycsqrf909d6jdak8yah53";
diff --git a/pkgs/tools/text/gnugrep/malloc.patch b/pkgs/tools/text/gnugrep/malloc.patch
new file mode 100644
index 0000000000000..b645c64a09e14
--- /dev/null
+++ b/pkgs/tools/text/gnugrep/malloc.patch
@@ -0,0 +1,15 @@
+http://www.mail-archive.com/bug-grep@gnu.org/msg02537.html
+
+diff --git a/src/kwset.c b/src/kwset.c
+index 050562e..995be79 100644
+--- a/src/kwset.c
++++ b/src/kwset.c
+@@ -40,7 +40,7 @@
+ #ifdef GREP
+ # include "xalloc.h"
+ # undef malloc
+-# define malloc(s) xmalloc(s)
++# define malloc xmalloc
+ #endif
+
+ #define NCHAR (UCHAR_MAX + 1)