From: Tom Hughes Date: Thu, 29 Apr 2010 09:01:21 +0000 (+0000) Subject: Include valgrind headers before system headers to avoid problems X-Git-Tag: svn/VALGRIND_3_6_0~311 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee1b05c5623186ee73dc1e774917c6f4fcf8920c;p=thirdparty%2Fvalgrind.git Include valgrind headers before system headers to avoid problems with the system headers #defining things which are used as names of structure members in vki headers. This is needed to allow valgrind to build on Fedora 13 and Rawhide. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11113 --- diff --git a/auxprogs/valgrind-listener.c b/auxprogs/valgrind-listener.c index 4667288d72..4a46b18d94 100644 --- a/auxprogs/valgrind-listener.c +++ b/auxprogs/valgrind-listener.c @@ -32,6 +32,16 @@ /*---------------------------------------------------------------*/ +/* Include valgrind headers before system headers to avoid problems + with the system headers #defining things which are used as names + of structure members in vki headers. */ + +#include "pub_core_basics.h" +#include "pub_core_libcassert.h" // For VG_BUGS_TO +#include "pub_core_vki.h" // Avoids warnings from + // pub_core_libcfile.h +#include "pub_core_libcfile.h" // For VG_CLO_DEFAULT_LOGPORT + #include #include #include @@ -44,12 +54,6 @@ #include #include -#include "pub_core_basics.h" -#include "pub_core_libcassert.h" // For VG_BUGS_TO -#include "pub_core_vki.h" // Avoids warnings from - // pub_core_libcfile.h -#include "pub_core_libcfile.h" // For VG_CLO_DEFAULT_LOGPORT - /*---------------------------------------------------------------*/ diff --git a/coregrind/launcher-linux.c b/coregrind/launcher-linux.c index 3a28b54228..c7661cee5d 100644 --- a/coregrind/launcher-linux.c +++ b/coregrind/launcher-linux.c @@ -32,6 +32,16 @@ and so it doesn't have to conform to Valgrind's arcane rules on no-glibc-usage etc. */ +/* Include valgrind headers before system headers to avoid problems + with the system headers #defining things which are used as names + of structure members in vki headers. */ + +#include "pub_core_debuglog.h" +#include "pub_core_vki.h" // Avoids warnings from + // pub_core_libcfile.h +#include "pub_core_libcproc.h" // For VALGRIND_LIB, VALGRIND_LAUNCHER +#include "pub_core_ume.h" + #include #include #include @@ -45,12 +55,6 @@ #include #include -#include "pub_core_debuglog.h" -#include "pub_core_vki.h" // Avoids warnings from - // pub_core_libcfile.h -#include "pub_core_libcproc.h" // For VALGRIND_LIB, VALGRIND_LAUNCHER -#include "pub_core_ume.h" - #define PATH_MAX 4096 /* POSIX refers to this a lot but I dunno