summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-18 21:57:38 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-18 21:57:38 +0000
commit5a9907dcad96c24ef6da9b4dfc693afdc4ae8e58 (patch)
treef6652339e17797ce3ff9f6d0a1af6bb3820849e5
parent25234f15c71e3b5c0e1bb000314eed14d7f27f9c (diff)
addr2line.c: fix r60841 for glibc before 2.22
SHF_COMPRESSED was not defined until glibc 2.22, and there are older distros (e.g. Debian 8.x jessie) which do not have this defined. Perhaps it is safe to define SHF_COMPRESSED to (1 << 11) ourselves, too, since ELF should be a standardized format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--addr2line.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/addr2line.c b/addr2line.c
index 13bf747655..44ccff0d0d 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -95,6 +95,10 @@ void *alloca();
#define PATH_MAX 4096
#endif
+#ifndef SHF_COMPRESSED /* compatibility with glibc < 2.22 */
+#define SHF_COMPRESSED 0
+#endif
+
int kprintf(const char *fmt, ...);
typedef struct {