This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED PATCH] 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.
---
 gdb/ChangeLog    |    5 +++++
 gdb/cp-support.c |    4 ++++
 2 files changed, 9 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);
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]