summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaniel Macks <dmacks@netspace.org>2009-07-16 23:04:21 -0400
committerRay Strode <rstrode@redhat.com>2009-07-16 23:04:21 -0400
commit82b84fae0912c82cbef7d3b6bfedf934db8047b8 (patch)
tree12f7fb26f686660b8a8a0a780cfcdb838c69e1a6 /common
parent2ca2209c18b6659c8282039732bb62436779db55 (diff)
downloadgdm-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
Diffstat (limited to 'common')
-rw-r--r--common/gdm-signal-handler.c8
1 files changed, 6 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.");
}