* Some (hopefully temporary) hacks to get Valgrind to compile with

2.6.10 headers.  Now everything in populate-cache.nix builds again :-)

svn path=/nixpkgs/trunk/; revision=2291
This commit is contained in:
Eelco Dolstra 2005-02-23 20:56:08 +00:00
parent 5b6b8d3e3e
commit 8d24f2179f
2 changed files with 44 additions and 0 deletions

View File

@ -12,4 +12,14 @@ stdenv.mkDerivation {
md5 = "30dc51f6fc94751b90b04af9c2e2c656";
};
buildInputs = [perl];
# Hack to get Valgrind to compile with Linux 2.6.10 headers. The
# file `include/asm/processor.h' indirectly needs
# CONFIG_X86_L1_CACHE_SHIFT (for the alignment of some type that
# probably isn't relevant here anyway).
# !!! maybe this should be done in linux-headers?
NIX_CFLAGS_COMPILE = "-DCONFIG_X86_L1_CACHE_SHIFT=7";
# Another kernel header problem.
patches = [./pgoff_t.patch];
}

View File

@ -0,0 +1,34 @@
diff -rc valgrind-orig/coregrind/vg_unsafe.h valgrind-2.2.0/coregrind/vg_unsafe.h
*** valgrind-orig/coregrind/vg_unsafe.h 2004-08-29 23:02:28.000000000 +0200
--- valgrind-2.2.0/coregrind/vg_unsafe.h 2005-02-23 21:39:25.000000000 +0100
***************
*** 31,36 ****
--- 31,40 ----
*/
+ #ifndef pgoff_t
+ #define pgoff_t unsigned long
+ #endif
+
/* These includes are only used for making sense of the args for
system calls. */
#include "vg_unistd.h" /* for system call numbers */
***************
*** 47,53 ****
#include <sys/socket.h> /* for struct msghdr */
#include <linux/sockios.h>/* for SIOCOUTQ */
#include <sys/un.h> /* for sockaddr_un */
! #include <net/if.h> /* for struct ifreq et al */
#include <net/if_arp.h> /* for struct arpreq */
#include <net/route.h> /* for struct rtentry */
#ifdef HAVE_LINUX_COMPILER_H
--- 51,58 ----
#include <sys/socket.h> /* for struct msghdr */
#include <linux/sockios.h>/* for SIOCOUTQ */
#include <sys/un.h> /* for sockaddr_un */
! /* hack - should be fixed in CVS */
! //#include <net/if.h> /* for struct ifreq et al */
#include <net/if_arp.h> /* for struct arpreq */
#include <net/route.h> /* for struct rtentry */
#ifdef HAVE_LINUX_COMPILER_H