diff --git a/configure.in b/configure.in index c679432e..c628b571 100644 --- a/configure.in +++ b/configure.in @@ -55,6 +55,12 @@ AC_CHECK_TYPES([sighandler_t], [], [], # include #endif ]) +AC_CHECK_TYPES([struct elf_prstatus, struct prstatus], [], [], +[$ac_includes_default +#if HAVE_SYS_PROCFS_H +# include +#endif +]) AC_CHECK_DECLS([PTRACE_POKEUSER, PTRACE_POKEDATA, PTRACE_TRACEME, PTRACE_CONT, PTRACE_SINGLESTEP, diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h index 357f8afd..82ffa661 100644 --- a/src/coredump/_UCD_internal.h +++ b/src/coredump/_UCD_internal.h @@ -83,7 +83,13 @@ struct UCD_info coredump_phdr_t *phdrs; /* array, allocated */ unsigned phdrs_count; void *note_phdr; /* allocated or NULL */ +#if defined(HAVE_STRUCT_ELF_PRSTATUS) struct elf_prstatus *prstatus; /* points inside note_phdr */ +#elif defined(HAVE_STRUCT_PRSTATUS) + struct prstatus *prstatus; /* points inside note_phdr */ +#else + struct non_existent *prstatus; +#endif struct elf_dyn_info edi; };