diff options
author | Daniel Macks <dmacks@netspace.org> | 2009-07-16 23:04:21 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2009-07-16 23:04:21 -0400 |
commit | 82b84fae0912c82cbef7d3b6bfedf934db8047b8 (patch) | |
tree | 12f7fb26f686660b8a8a0a780cfcdb838c69e1a6 | |
parent | 2ca2209c18b6659c8282039732bb62436779db55 (diff) | |
download | gdm-82b84fae0912c82cbef7d3b6bfedf934db8047b8.tar.gz |
Only call backtrace() if execinfo.h exists
This fixes a build problem on OSX.
See http://bugzilla.gnome.org/show_bug.cgi?id=568491
-rw-r--r-- | common/gdm-signal-handler.c | 8 | ||||
-rw-r--r-- | configure.ac | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/common/gdm-signal-handler.c b/common/gdm-signal-handler.c index b9362b3c..6b7b6159 100644 --- a/common/gdm-signal-handler.c +++ b/common/gdm-signal-handler.c @@ -27,7 +27,9 @@ #include <unistd.h> #include <string.h> #include <signal.h> +#if HAVE_EXECINFO_H #include <execinfo.h> +#endif #include <syslog.h> #include <sys/wait.h> #include <sys/stat.h> @@ -160,6 +162,7 @@ signal_io_watch (GIOChannel *ioc, static void fallback_get_backtrace (void) { +#ifdef HAVE_EXECINFO_H void * frames[64]; size_t size; char ** strings; @@ -173,9 +176,10 @@ fallback_get_backtrace (void) } free (strings); syslog (LOG_CRIT, "******************* END **********************************"); - } else { - g_warning ("GDM crashed, but symbols couldn't be retrieved."); + return; } +#endif + g_warning ("GDM crashed, but symbols couldn't be retrieved."); } diff --git a/configure.ac b/configure.ac index 22fff72d..f8feddc6 100644 --- a/configure.ac +++ b/configure.ac @@ -899,6 +899,12 @@ AC_SUBST(RBAC_LIBS) dnl --------------------------------------------------------------------------- +dnl check for backtrace support +dnl --------------------------------------------------------------------------- + +AC_CHECK_HEADERS(execinfo.h) + +dnl --------------------------------------------------------------------------- dnl - Define some variables to represent the directories we use. dnl --------------------------------------------------------------------------- |