]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Include valgrind headers before system headers to avoid problems
authorTom Hughes <tom@compton.nu>
Thu, 29 Apr 2010 09:01:21 +0000 (09:01 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 29 Apr 2010 09:01:21 +0000 (09:01 +0000)
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

auxprogs/valgrind-listener.c
coregrind/launcher-linux.c

index 4667288d7234611da1d878b142820d17eb77fd30..4a46b18d94b60aa039b3680dc17bf1dd20621ff8 100644 (file)
 
 /*---------------------------------------------------------------*/
 
+/* 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 <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 
-#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
-
 
 /*---------------------------------------------------------------*/
 
index 3a28b54228f05d017e0f9b7dca5b9849f576b5eb..c7661cee5df70579b3384c9a310412535ca33748 100644 (file)
    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 <assert.h>
 #include <ctype.h>
 #include <elf.h>
 #include <sys/user.h>
 #include <unistd.h>
 
-#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