3
0
Fork 0
forked from mirrors/nixpkgs

Making valgrind build with glibc 2.12 (now tested in x86_64)

svn path=/nixpkgs/branches/stdenv-updates/; revision=24029
This commit is contained in:
Lluís Batlle i Rossell 2010-10-03 09:12:39 +00:00
parent 6391408e7a
commit 7867c5ee47
2 changed files with 54 additions and 1 deletions

View file

@ -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";

View file

@ -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;