http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/valgrind/files/valgrind-3.5.0-glibc-2.12.patch?revision=1.1
http://cvs.fedoraproject.org/viewvc/rpms/valgrind/devel/valgrind-3.5.0-glibc-2.12.patch?view=log

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/valgrind/files/valgrind-3.5.0-stat_h.patch?revision=1.1
http://cvs.fedoraproject.org/viewvc/rpms/valgrind/devel/valgrind-3.5.0-stat_h.patch?view=log

--- configure.in
+++ configure.in
@@ -666,6 +666,16 @@ AC_EGREP_CPP([GLIBC_211], [
 ],
 GLIBC_VERSION="2.11")
 
+AC_EGREP_CPP([GLIBC_212], [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 12)
+  GLIBC_212
+ #endif
+#endif
+],
+GLIBC_VERSION="2.12")
+
 AC_EGREP_CPP([AIX5_LIBC], [
 #include <standards.h>
 #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
@@ -759,6 +769,13 @@ case "${GLIBC_VERSION}" in
 	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
 	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
 	;;
+     2.12)
+	AC_MSG_RESULT(2.12 family)
+	AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.x])
+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+	;;
      aix5)
 	AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
 	AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
--- config.h.in
+++ config.h.in
@@ -18,6 +18,9 @@
 /* Define to 1 if you're using glibc 2.11.x */
 #undef GLIBC_2_11
 
+/* Define to 1 if you're using glibc 2.12.x */
+#undef GLIBC_2_12
+
 /* Define to 1 if you're using glibc 2.2.x */
 #undef GLIBC_2_2
 

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

