diff options
author | Wez Furlong <wez@messagesystems.com> | 2012-03-24 14:27:02 -0400 |
---|---|---|
committer | Wez Furlong <wez@messagesystems.com> | 2012-03-24 14:27:02 -0400 |
commit | 2ba434759480381e6bb6cc91b5a1461b221fb945 (patch) | |
tree | 217b73ddca02dddcfc8b8f337b27ac6989789865 /libdwarf | |
parent | 49ab3e0dd3256b9887890e7074dea7248e522bf5 (diff) | |
download | ctf-2ba434759480381e6bb6cc91b5a1461b221fb945.tar.gz |
Diffstat (limited to 'libdwarf')
-rw-r--r-- | libdwarf/dwarf_init.c | 7 |
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; } |