summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in12
-rw-r--r--source3/include/includes.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 8ac3d20705..928e57baac 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -752,6 +752,18 @@ CPPFLAGS="$old_CPPFLAGS"
# subdirectory of headers.
AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h)
+/* check for linux on amd64 since valgrind is not quite there yet */
+case "$host_os" in
+ *linux*)
+ case "$UNAME_P" in
+ *x86_64*)
+ AC_DEFINE(HAVE_64BIT_LINUX,1,[Whether we are running on 64bit linux])
+ ;;
+ esac
+ ;;
+esac
+
+
#
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
# This causes configure to fail to detect it. Check for shadow separately on HPUX.
diff --git a/source3/include/includes.h b/source3/include/includes.h
index c091506381..6cab2525b0 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -507,6 +507,8 @@
#include <aio.h>
#endif
+/* skip valgrind headers on 64bit AMD boxes */
+#ifndef HAVE_64BIT_LINUX
/* Special macros that are no-ops except when run under Valgrind on
* x86. They've moved a little bit from valgrind 1.0.4 to 1.9.4 */
#if HAVE_VALGRIND_MEMCHECK_H
@@ -515,6 +517,7 @@
#elif HAVE_VALGRIND_H
#include <valgrind.h>
#endif
+#endif
/* If we have --enable-developer and the valgrind header is present,
* then we're OK to use it. Set a macro so this logic can be done only