summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-26 03:04:27 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-26 03:04:27 (GMT)
commitfdf7b4586fe91756b9a8b6ed1bf5d9b37c1aab6d (patch)
tree578ac23531fd4e964b00949c1ecb2f9f96dfdda8 /addr2line.c
parent286d567bbffb1baef497ecfe9a91fa690ecb7526 (diff)
* addr2line.c: Include ELF header after system headers (especially
sys/types.h) to avoid compilation failure, "usr/include/sh3/elf_machdep.h:4:2: error: #error Define _BYTE_ORDER!", on NetBSD/sh3 (dreamcast, hpcsh, landisk, mmeye). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/addr2line.c b/addr2line.c
index f89a9d2..f936694 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -17,11 +17,6 @@
#ifdef USE_ELF
-#ifdef __OpenBSD__
-#include <elf_abi.h>
-#else
-#include <elf.h>
-#endif
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
@@ -33,6 +28,12 @@
#include <sys/stat.h>
#include <unistd.h>
+#ifdef __OpenBSD__
+#include <elf_abi.h>
+#else
+#include <elf.h>
+#endif
+
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist