diff options
author | Martin Willi <martin@strongswan.org> | 2006-12-06 13:59:13 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-12-06 13:59:13 +0000 |
commit | e696757c47f2b2f73ee92cccf4927d827d245309 (patch) | |
tree | bab21682a03841894f75303c0d5b7c1ddea5dd45 /src/charon/daemon.c | |
parent | f87e5dd98ce6b7ffbec60edbce9b75cc61e5d639 (diff) | |
download | strongswan-e696757c47f2b2f73ee92cccf4927d827d245309.tar.bz2 strongswan-e696757c47f2b2f73ee92cccf4927d827d245309.tar.xz |
made backtrace() calls optional to support uClibc
Diffstat (limited to 'src/charon/daemon.c')
-rw-r--r-- | src/charon/daemon.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/charon/daemon.c b/src/charon/daemon.c index 1fd9f9a0a..f9e913c1b 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -285,6 +285,7 @@ static void initialize(private_daemon_t *this, bool strict, bool syslog, */ void signal_handler(int signal) { +#ifndef HAVE_BACKTRACE void *array[20]; size_t size; char **strings; @@ -294,13 +295,17 @@ void signal_handler(int signal) strings = backtrace_symbols(array, size); DBG1(DBG_DMN, "thread %u received %s. Dumping %d frames from stack:", - signal == SIGSEGV ? "SIGSEGV" : "SIGILL", pthread_self(), size); + pthread_self(), signal == SIGSEGV ? "SIGSEGV" : "SIGILL", size); for (i = 0; i < size; i++) { DBG1(DBG_DMN, " %s", strings[i]); } free (strings); +#else /* !HAVE_BACKTRACE */ + DBG1(DBG_DMN, "thread %u received %s", + pthread_self(), signal == SIGSEGV ? "SIGSEGV" : "SIGILL"); +#endif /* HAVE_BACKTRACE */ DBG1(DBG_DMN, "killing ourself hard after SIGSEGV"); raise(SIGKILL); } |