diff options
Diffstat (limited to 'mwrap_httpd.h')
-rw-r--r-- | mwrap_httpd.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mwrap_httpd.h b/mwrap_httpd.h index 5c5a58b..6856208 100644 --- a/mwrap_httpd.h +++ b/mwrap_httpd.h @@ -410,15 +410,11 @@ static off_t write_loc_name(FILE *fp, const struct src_loc *l) else fprintf(fp, ":%zu", l->lineno); } else { - size_t i; - char **s = backtrace_symbols((void *)l->bt, (int)l->bt_len); + char **s = bt_syms(l->bt, l->bt_len); + if (!s) return -1; - if (!s) { - fprintf(stderr, "backtrace_symbols: %m\n"); - return -1; - } fputs(s[0], fp); - for (i = 1; i < l->bt_len; i++) { + for (uint32_t i = 1; i < l->bt_len; i++) { fputc('\n', fp); fputs(s[i], fp); } |