summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Chaudhry <rahulchaudhry@google.com>2018-03-27 10:04:28 -0700
committerRahul Chaudhry <rahulchaudhry@google.com>2018-03-27 10:04:28 -0700
commitb415c49e4c4b8fcddc1f5551bb1e357a8fe93ad7 (patch)
tree8881cba66123f00b5bd3ce467d83151bf4db2214
parentb162eb11c3cf4708fa281908730d106d1274a4bb (diff)
downloadbinutils-b415c49e4c4b8fcddc1f5551bb1e357a8fe93ad7.tar.gz
gold: fix build errors on darwin.
Some cc files include both "gold.h" and "output.h", which makes the compiler on mac complain about redefinition of __STDC_FORMAT_MACROS. Change-Id: I11875d9b76d27449167485ae5f91f026acbda8e1
-rw-r--r--binutils-2.27/gold/gold.h2
-rw-r--r--binutils-2.27/gold/output.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/binutils-2.27/gold/gold.h b/binutils-2.27/gold/gold.h
index c75bc7f2..3d7ac083 100644
--- a/binutils-2.27/gold/gold.h
+++ b/binutils-2.27/gold/gold.h
@@ -32,9 +32,11 @@
#include <stdint.h>
#include <sys/types.h>
+#ifndef __STDC_FORMAT_MACROS
// __STDC_FORMAT_MACROS is needed to turn on macros in <inttypes.h>.
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
+#endif
#include "system.h"
diff --git a/binutils-2.27/gold/output.h b/binutils-2.27/gold/output.h
index f4b8e5eb..ee109f00 100644
--- a/binutils-2.27/gold/output.h
+++ b/binutils-2.27/gold/output.h
@@ -27,9 +27,11 @@
#include <list>
#include <vector>
+#ifndef __STDC_FORMAT_MACROS
// __STDC_FORMAT_MACROS is needed to turn on macros in <inttypes.h>.
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
+#endif
#include "elfcpp.h"
#include "mapfile.h"