[icinga-checkins] icinga.org: icinga2/master: *NIX build fix.

git at icinga.org git at icinga.org
Thu Mar 7 15:16:07 CET 2013


Module: icinga2
Branch: master
Commit: e54604c0e36413903eb984c531a7894e0ee163c3
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=e54604c0e36413903eb984c531a7894e0ee163c3

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Mar  7 15:16:01 2013 +0100

*NIX build fix.

---

 lib/base/application.cpp |    3 ++-
 lib/base/stacktrace.cpp  |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/base/application.cpp b/lib/base/application.cpp
index 6f9add2..ecd6c33 100644
--- a/lib/base/application.cpp
+++ b/lib/base/application.cpp
@@ -317,7 +317,8 @@ void Application::SigAbrtHandler(int signum)
 
 	std::cerr << "Caught SIGABRT." << std::endl;
 
-	Utility::PrintStacktrace(std::cerr, 1);
+	StackTrace trace;
+	trace.Print(std::cerr, 1);
 
 	DisplayBugMessage();
 }
diff --git a/lib/base/stacktrace.cpp b/lib/base/stacktrace.cpp
index a08e5bc..4ed919c 100644
--- a/lib/base/stacktrace.cpp
+++ b/lib/base/stacktrace.cpp
@@ -88,8 +88,10 @@ StackTrace::StackTrace(PEXCEPTION_POINTERS exi)
 
 void StackTrace::Initialize(void)
 {
+#ifdef _WIN32
 	(void) SymSetOptions(SYMOPT_UNDNAME | SYMOPT_LOAD_LINES);
 	(void) SymInitialize(GetCurrentProcess(), NULL, TRUE);
+#endif /* _WIN32 */
 }
 
 /**
@@ -133,8 +135,6 @@ void StackTrace::Print(ostream& fp, int ignoreFrames)
 	free(messages);
 
 	fp << std::endl;
-
-	return true;
 #	else /* HAVE_BACKTRACE_SYMBOLS */
 	fp << "(not available)" << std::endl;
 #	endif /* HAVE_BACKTRACE_SYMBOLS */





More information about the icinga-checkins mailing list