|
From: <sv...@va...> - 2010-04-29 09:01:30
|
Author: tom
Date: 2010-04-29 10:01:21 +0100 (Thu, 29 Apr 2010)
New Revision: 11113
Log:
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.
Modified:
trunk/auxprogs/valgrind-listener.c
trunk/coregrind/launcher-linux.c
Modified: trunk/auxprogs/valgrind-listener.c
===================================================================
--- trunk/auxprogs/valgrind-listener.c 2010-04-29 07:11:46 UTC (rev 11112)
+++ trunk/auxprogs/valgrind-listener.c 2010-04-29 09:01:21 UTC (rev 11113)
@@ -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 <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -44,13 +54,7 @@
#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
-
/*---------------------------------------------------------------*/
/* The maximum allowable number concurrent connections. */
Modified: trunk/coregrind/launcher-linux.c
===================================================================
--- trunk/coregrind/launcher-linux.c 2010-04-29 07:11:46 UTC (rev 11112)
+++ trunk/coregrind/launcher-linux.c 2010-04-29 09:01:21 UTC (rev 11113)
@@ -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 <assert.h>
#include <ctype.h>
#include <elf.h>
@@ -45,14 +55,8 @@
#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
where it is defined */
|