summaryrefslogtreecommitdiff
path: root/libbacktrace
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-04-17 17:29:27 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-04-17 17:29:27 +0000
commitc36af1b4da7efda503da001274ec514b06324a78 (patch)
treea4e43754e24b26fdab52d9bcec17ddfc6cd34ae4 /libbacktrace
parentdb051c243c032dbb327058590bc448edb201a6e6 (diff)
downloadgcc-c36af1b4da7efda503da001274ec514b06324a78.tar.gz
backtrace.c: Include backtrace-supported.h before checking BACKTRACE_USES_MALLOC.
* backtrace.c: Include backtrace-supported.h before checking BACKTRACE_USES_MALLOC. From-SVN: r259439
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/ChangeLog5
-rw-r--r--libbacktrace/backtrace.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index b26da88223f..039e56f7aa0 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,5 +1,10 @@
2018-04-17 Ian Lance Taylor <iant@golang.org>
+ * backtrace.c: Include backtrace-supported.h before checking
+ BACKTRACE_USES_MALLOC.
+
+2018-04-17 Ian Lance Taylor <iant@golang.org>
+
* backtrace.c (backtrace_full): When testing whether we can
allocate memory, call mmap directly, and munmap the memory.
diff --git a/libbacktrace/backtrace.c b/libbacktrace/backtrace.c
index 319edcf12eb..5bcd370e378 100644
--- a/libbacktrace/backtrace.c
+++ b/libbacktrace/backtrace.c
@@ -35,13 +35,14 @@ POSSIBILITY OF SUCH DAMAGE. */
#include <unistd.h>
#include <sys/types.h>
+#include "backtrace-supported.h"
+
#if !BACKTRACE_USES_MALLOC
#include <sys/mman.h>
#endif
#include "unwind.h"
#include "backtrace.h"
-#include "backtrace-supported.h"
#include "internal.h"
#ifndef MAP_ANONYMOUS