aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-support.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-07-23 15:25:05 +0100
committerGary Benson <gbenson@redhat.com>2014-07-23 15:25:05 +0100
commit91b522404e7eee8b4101bccabc29821792e6a627 (patch)
treeeff6f7dfa2942448f2c123ae9b8a0f9e3d8a2e75 /gdb/cp-support.c
parente294541cdab0373f6097862de1068cc985e7e242 (diff)
downloadgdb-91b522404e7eee8b4101bccabc29821792e6a627.zip
gdb-91b522404e7eee8b4101bccabc29821792e6a627.tar.gz
gdb-91b522404e7eee8b4101bccabc29821792e6a627.tar.bz2
Fix build on systems without sigaltstack.
This commit fixes the build on systems without sigaltstack. gdb/ 2014-07-23 Gary Benson <gbenson@redhat.com> * cp-support.c (gdb_demangle): Fix build on systems without sigaltstack.
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r--gdb/cp-support.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index a8ea6fc..5464117 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1557,7 +1557,11 @@ gdb_demangle (const char *name, int options)
#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
sa.sa_handler = gdb_demangle_signal_handler;
sigemptyset (&sa.sa_mask);
+#ifdef HAVE_SIGALTSTACK
sa.sa_flags = SA_ONSTACK;
+#else
+ sa.sa_flags = 0;
+#endif
sigaction (SIGSEGV, &sa, &old_sa);
#else
ofunc = (void (*)()) signal (SIGSEGV, gdb_demangle_signal_handler);