summaryrefslogtreecommitdiff
path: root/libdwarf
diff options
context:
space:
mode:
authorWez Furlong <wez@messagesystems.com>2012-03-24 14:27:02 -0400
committerWez Furlong <wez@messagesystems.com>2012-03-24 14:27:02 -0400
commit2ba434759480381e6bb6cc91b5a1461b221fb945 (patch)
tree217b73ddca02dddcfc8b8f337b27ac6989789865 /libdwarf
parent49ab3e0dd3256b9887890e7074dea7248e522bf5 (diff)
downloadctf-2ba434759480381e6bb6cc91b5a1461b221fb945.tar.gz
on Solaris, use the system libelf.HEADmaster
Diffstat (limited to 'libdwarf')
-rw-r--r--libdwarf/dwarf_init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libdwarf/dwarf_init.c b/libdwarf/dwarf_init.c
index 7749345..63c03fd 100644
--- a/libdwarf/dwarf_init.c
+++ b/libdwarf/dwarf_init.c
@@ -610,7 +610,12 @@ dwarf_elf_read(Dwarf_Debug dbg, Dwarf_Error *error)
}
/* Get the section index to the string table. */
- if (elf_getshdrstrndx(dbg->dbg_elf, &dbg->dbg_stnum) == -1) {
+#ifdef sun
+ i = elf_getshstrndx(dbg->dbg_elf, &dbg->dbg_stnum) == 0;
+#else
+ i = elf_getshdrstrndx(dbg->dbg_elf, &dbg->dbg_stnum) == -1;
+#endif
+ if (i) {
DWARF_SET_ELF_ERROR(error, elf_errno());
return DWARF_E_ELF;
}