aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-14 05:04:18 +0000
committerMike Frysinger <vapier@gentoo.org>2012-03-14 05:04:18 +0000
commit51e40b125fca4d48b283e535955f683dce935046 (patch)
tree6ee3730933627cf0f318bf46038e45d003fb18d5
parentff1e452654d9ddb207b0c26c4baf39e254d9362b (diff)
downloadgdb-51e40b125fca4d48b283e535955f683dce935046.zip
gdb-51e40b125fca4d48b283e535955f683dce935046.tar.gz
gdb-51e40b125fca4d48b283e535955f683dce935046.tar.bz2
sim: ppc: fix compilation on AIX 7.1 due to st_pad name collisions
AIX 7.1 defines st_pad[123] to st_[amc]tim.tv_pad, respectively, breaking declaration of st_pad[123] members in struct solaris_stat. Undefine them as this is no less terrible than other solutions (like renaming the fields and losing the binding to Solaris' names). From: Michael Haubenwallner <haubi@s01en24.gentoo.org>
-rw-r--r--sim/ppc/ChangeLog4
-rw-r--r--sim/ppc/emul_unix.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 769b299..042a558 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-14 Michael Haubenwallner <michael.haubenwallner@salomon.at>
+
+ * emul_unix.c (st_pad1, st_pad2, st_pad3): Undefine.
+
2012-01-02 Joel Brobecker <brobecker@adacore.com>
* dp-bit.c: Reformat copyright header.
diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c
index 36738c4..e66d23f 100644
--- a/sim/ppc/emul_unix.c
+++ b/sim/ppc/emul_unix.c
@@ -1034,6 +1034,11 @@ typedef unsigned32 solaris_nlink_t;
#ifdef HAVE_SYS_STAT_H
#define SOLARIS_ST_FSTYPSZ 16 /* array size for file system type name */
+/* AIX 7.1 defines st_pad[123] to st_[amc]tim.tv_pad, respectively */
+#undef st_pad1
+#undef st_pad2
+#undef st_pad3
+
struct solaris_stat {
solaris_dev_t st_dev;
signed32 st_pad1[3]; /* reserved for network id */