[icinga-checkins] icinga.org: icinga2/master: XNU build fixes.

git at icinga.org git at icinga.org
Thu Mar 14 15:14:13 CET 2013


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Mar 14 15:14:07 2013 +0100

XNU build fixes.

---

 components/checker/Makefile.am      |    1 +
 components/compat/Makefile.am       |    1 +
 components/delegation/Makefile.am   |    1 +
 components/demo/Makefile.am         |    1 +
 components/livestatus/Makefile.am   |    1 +
 components/notification/Makefile.am |    1 +
 components/replication/Makefile.am  |    1 +
 itl/Makefile.am                     |    2 ++
 lib/base/exception.cpp              |    4 ++--
 lib/base/process-unix.cpp           |    6 ++++++
 lib/config/Makefile.am              |    2 ++
 lib/icinga/Makefile.am              |    1 +
 lib/remoting/Makefile.am            |    2 ++
 13 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/components/checker/Makefile.am b/components/checker/Makefile.am
index e4e00dc..6329c33 100644
--- a/components/checker/Makefile.am
+++ b/components/checker/Makefile.am
@@ -32,6 +32,7 @@ libchecker_la_LDFLAGS = \
 libchecker_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/components/compat/Makefile.am b/components/compat/Makefile.am
index 8896fde..f79b52b 100644
--- a/components/compat/Makefile.am
+++ b/components/compat/Makefile.am
@@ -32,6 +32,7 @@ libcompat_la_LDFLAGS = \
 libcompat_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/components/delegation/Makefile.am b/components/delegation/Makefile.am
index c51c691..1dabc86 100644
--- a/components/delegation/Makefile.am
+++ b/components/delegation/Makefile.am
@@ -32,6 +32,7 @@ libdelegation_la_LDFLAGS = \
 libdelegation_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/components/demo/Makefile.am b/components/demo/Makefile.am
index 3b5d659..a4230cf 100644
--- a/components/demo/Makefile.am
+++ b/components/demo/Makefile.am
@@ -32,6 +32,7 @@ libdemo_la_LDFLAGS = \
 libdemo_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/components/livestatus/Makefile.am b/components/livestatus/Makefile.am
index a94b098..4de52ed 100644
--- a/components/livestatus/Makefile.am
+++ b/components/livestatus/Makefile.am
@@ -66,6 +66,7 @@ liblivestatus_la_LDFLAGS = \
 liblivestatus_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/components/notification/Makefile.am b/components/notification/Makefile.am
index 1e10da5..c86ba30 100644
--- a/components/notification/Makefile.am
+++ b/components/notification/Makefile.am
@@ -32,6 +32,7 @@ libnotification_la_LDFLAGS = \
 libnotification_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/components/replication/Makefile.am b/components/replication/Makefile.am
index b1eab15..d47d6ba 100644
--- a/components/replication/Makefile.am
+++ b/components/replication/Makefile.am
@@ -32,6 +32,7 @@ libreplication_la_LDFLAGS = \
 libreplication_la_LIBADD = \
 	$(BOOST_SIGNALS_LIB) \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la \
diff --git a/itl/Makefile.am b/itl/Makefile.am
index b2eb467..1dc4d4d 100644
--- a/itl/Makefile.am
+++ b/itl/Makefile.am
@@ -6,3 +6,5 @@ icinga2itl_DATA = \
 	service.conf \
 	service-common.conf \
 	standalone.conf
+
+EXTRA_DIST = $(icinga2itl_DATA)
diff --git a/lib/base/exception.cpp b/lib/base/exception.cpp
index 11233b6..63a811f 100644
--- a/lib/base/exception.cpp
+++ b/lib/base/exception.cpp
@@ -23,7 +23,7 @@ using namespace icinga;
 
 boost::thread_specific_ptr<StackTrace> Exception::m_LastStackTrace;
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__APPLE__)
 extern "C"
 void __cxa_throw(void *obj, void *pvtinfo, void (*dest)(void *))
 {
@@ -53,7 +53,7 @@ void __cxa_throw(void *obj, void *pvtinfo, void (*dest)(void *))
 
 	real_cxa_throw(obj, pvtinfo, dest);
 }
-#endif /* _WIN32 */
+#endif /* !_WIN32 && !__APPLE__ */
 
 StackTrace *Exception::GetLastStackTrace(void)
 {
diff --git a/lib/base/process-unix.cpp b/lib/base/process-unix.cpp
index fb43901..250e52c 100644
--- a/lib/base/process-unix.cpp
+++ b/lib/base/process-unix.cpp
@@ -27,7 +27,13 @@ using namespace icinga;
 condition_variable Process::m_CV;
 int Process::m_TaskFd;
 Timer::Ptr Process::m_StatusTimer;
+
+#ifndef __APPLE__
 extern char **environ;
+#else /* __APPLE__ */
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#endif /* __APPLE__ */
 
 void Process::Initialize(void)
 {
diff --git a/lib/config/Makefile.am b/lib/config/Makefile.am
index 60f4715..e9cbc3e 100644
--- a/lib/config/Makefile.am
+++ b/lib/config/Makefile.am
@@ -52,4 +52,6 @@ libconfig_la_LDFLAGS = \
 	@VERSION_INFO@
 
 libconfig_la_LIBADD = \
+	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la
diff --git a/lib/icinga/Makefile.am b/lib/icinga/Makefile.am
index 6698cfb..7ea7904 100644
--- a/lib/icinga/Makefile.am
+++ b/lib/icinga/Makefile.am
@@ -73,6 +73,7 @@ libicinga_la_LDFLAGS = \
 
 libicinga_la_LIBADD = \
 	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la \
 	${top_builddir}/lib/remoting/libremoting.la
diff --git a/lib/remoting/Makefile.am b/lib/remoting/Makefile.am
index cb12b51..8be603e 100644
--- a/lib/remoting/Makefile.am
+++ b/lib/remoting/Makefile.am
@@ -37,5 +37,7 @@ libremoting_la_LDFLAGS = \
 	@VERSION_INFO@
 
 libremoting_la_LIBADD = \
+	$(BOOST_THREAD_LIB) \
+	$(BOOST_SYSTEM_LIB) \
 	${top_builddir}/lib/base/libbase.la \
 	${top_builddir}/lib/config/libconfig.la





More information about the icinga-checkins mailing list