aboutsummaryrefslogtreecommitdiff
path: root/e2fsck
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-06-16 16:14:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-06-16 17:54:39 -0400
commit3df6014a3d216d19be7d2286de24e8ee106f18ad (patch)
tree87bbe4f4fe975da41008d05dcc63befe594422a1 /e2fsck
parent1ad3174af5213fa7029944cc19723cda08f221d3 (diff)
downloade2fsprogs-3df6014a3d216d19be7d2286de24e8ee106f18ad.tar.gz
Work around Debian Bug #712530
Add a test to see if the backtrace() function requires linking in a library in /usr/lib. Addresses-Debian-Bug: #708307 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck')
-rw-r--r--e2fsck/Makefile.in3
-rw-r--r--e2fsck/sigcatcher.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
index 0c638e80..eadd5eaa 100644
--- a/e2fsck/Makefile.in
+++ b/e2fsck/Makefile.in
@@ -143,7 +143,8 @@ crc32table.h: gen_crc32table
$(E) " GEN32TABLE $@"
$(Q) ./gen_crc32table > crc32table.h
-tst_sigcatcher: $(srcdir)/sigcatcher.c
+tst_sigcatcher: $(srcdir)/sigcatcher.c sigcatcher.o
+ $(E) " CC $@"
$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) $(RDYNAMIC) \
$(srcdir)/sigcatcher.c -DDEBUG -o tst_sigcatcher
diff --git a/e2fsck/sigcatcher.c b/e2fsck/sigcatcher.c
index 13b9bccc..e4d60ce8 100644
--- a/e2fsck/sigcatcher.c
+++ b/e2fsck/sigcatcher.c
@@ -373,7 +373,7 @@ static void die_signal_handler(int signum, siginfo_t *siginfo,
fprintf(stderr, "fault addr=%p", siginfo->si_addr);
fprintf(stderr, "\n");
-#ifdef HAVE_BACKTRACE
+#if defined(HAVE_BACKTRACE) && !defined(DISABLE_BACKTRACE)
frames = backtrace(stack_syms, 32);
backtrace_symbols_fd(stack_syms, frames, 2);
#endif