34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
--- configure.ac
|
||
|
+++ configure.ac
|
||
|
@@ -251,6 +251,8 @@ AC_CHECK_HEADERS(CoreServices/CoreServices.h, [
|
||
|
])
|
||
|
AC_CHECK_FUNCS(backtrace backtrace_symbols backtrace_symbols_fd)
|
||
|
|
||
|
+AC_CHECK_FUNCS_ONCE(sys_siglist)
|
||
|
+
|
||
|
if test -n "$ac_cv_header_sys_statvfs_h"; then
|
||
|
AC_CHECK_MEMBERS([struct statvfs.f_fstypename,struct statvfs.f_basetype],
|
||
|
[AC_DEFINE([STATVFS_HAS_FSTYPE_AS_STRING], [1],[if statvfs holds fstype as string])],[],[[#include <sys/statvfs.h>]])
|
||
|
--- log.c
|
||
|
+++ log.c
|
||
|
@@ -78,11 +78,19 @@ static void crash_handler(int signo, siginfo_t *si, void *ucontext) {
|
||
|
dprintf(STDERR_FILENO,
|
||
|
"Terminating due to signal %d %s "
|
||
|
"generated by pid=%d uid=%d. %s (%p)\n",
|
||
|
+#ifdef HAVE_SYS_SIGLIST
|
||
|
signo, sys_siglist[signo], si->si_pid, si->si_uid,
|
||
|
+#else
|
||
|
+ signo, strsignal(signo), si->si_pid, si->si_uid,
|
||
|
+#endif
|
||
|
reason, si->si_value.sival_ptr);
|
||
|
} else {
|
||
|
dprintf(STDERR_FILENO, "Terminating due to signal %d %s. %s\n",
|
||
|
+#ifdef HAVE_SYS_SIGLIST
|
||
|
signo, sys_siglist[signo], reason);
|
||
|
+#else
|
||
|
+ signo, strsignal(signo), reason);
|
||
|
+#endif
|
||
|
}
|
||
|
|
||
|
#if defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS_FD)
|