From 7867c5ee473f199a8740094f4d4934ac15919795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 3 Oct 2010 09:12:39 +0000 Subject: [PATCH] Making valgrind build with glibc 2.12 (now tested in x86_64) svn path=/nixpkgs/branches/stdenv-updates/; revision=24029 --- .../tools/analysis/valgrind/default.nix | 2 +- .../tools/analysis/valgrind/stat_h.patch | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/tools/analysis/valgrind/stat_h.patch diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix index 056b05cd0d62..fa2b7b502a54 100644 --- a/pkgs/development/tools/analysis/valgrind/default.nix +++ b/pkgs/development/tools/analysis/valgrind/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # Make Valgrind compile with Glibc 2.12. - patches = [ ./glibc-2.12.patch ]; + patches = [ ./glibc-2.12.patch ./stat_h.patch ]; patchFlags = "-p0"; preConfigure = "autoreconf"; diff --git a/pkgs/development/tools/analysis/valgrind/stat_h.patch b/pkgs/development/tools/analysis/valgrind/stat_h.patch new file mode 100644 index 000000000000..c191cf456984 --- /dev/null +++ b/pkgs/development/tools/analysis/valgrind/stat_h.patch @@ -0,0 +1,53 @@ +Taken from gentoo: +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/valgrind/files/valgrind-3.5.0-stat_h.patch?view=markup + +http://cvs.fedoraproject.org/viewvc/rpms/valgrind/devel/valgrind-3.5.0-stat_h.patch?view=log + +--- include/vki/vki-amd64-linux.h ++++ include/vki/vki-amd64-linux.h +@@ -310,6 +310,9 @@ struct vki_stat { + long st_blksize; + long st_blocks; /* Number 512-byte blocks allocated. */ + ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- include/vki/vki-x86-linux.h ++++ include/vki/vki-x86-linux.h +@@ -348,6 +348,9 @@ struct vki_stat { + unsigned long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- include/vki/vki-ppc32-linux.h ++++ include/vki/vki-ppc32-linux.h +@@ -392,6 +392,9 @@ struct vki_stat { + long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- include/vki/vki-ppc64-linux.h ++++ include/vki/vki-ppc64-linux.h +@@ -428,6 +428,9 @@ struct vki_stat { + long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime;