[icinga-checkins] icinga.org: icinga2/master: Build fix V2.

git at icinga.org git at icinga.org
Sun Feb 10 17:44:07 CET 2013


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Sun Feb 10 17:44:03 2013 +0100

Build fix V2.

---

 configure.ac                  |    2 +-
 lib/base/process.cpp          |    1 +
 third-party/execvpe/execvpe.h |   18 ++++++++++++++----
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 30f9aaf..4378286 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ AC_CHECK_LIB(m, floor)
 AC_CHECK_LIB(socket, getsockname)
 AC_CHECK_LIB(ws2_32, getsockname)
 AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
-AC_CHECK_FUNCS([backtrace_symbols])
+AC_CHECK_FUNCS([backtrace_symbols execvpe])
 
 AC_MSG_CHECKING(whether to enable debugging)
 AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes]   turn on debugging (default=no)],, enable_debug=no)
diff --git a/lib/base/process.cpp b/lib/base/process.cpp
index 0d1d70e..1dd6dbd 100644
--- a/lib/base/process.cpp
+++ b/lib/base/process.cpp
@@ -18,6 +18,7 @@
  ******************************************************************************/
 
 #include "i2-base.h"
+#include <execvpe.h>
 
 using namespace icinga;
 
diff --git a/third-party/execvpe/execvpe.h b/third-party/execvpe/execvpe.h
index c599f11..00887a3 100644
--- a/third-party/execvpe/execvpe.h
+++ b/third-party/execvpe/execvpe.h
@@ -4,16 +4,26 @@
    Interface for code in execvpe.c
    ------------------------------------------------------------------------- */
 
+#include <unistd.h>
 #include <errno.h>
 #include <sys/types.h>
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
 
-#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)
-#ifndef __QNXNTO__
+#ifndef HAVE_EXECVPE
+#	ifdef __cplusplus
+extern "C" {
+#	endif /* __cplusplus */
+
+#	if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)
+#		ifndef __QNXNTO__
 extern int execvpe(char *name, char *const argv[], char **envp);
-#endif
+#	endif
 extern void pPrPr_disableITimers (void);
-#endif
+#	endif
 
+#	ifdef __cplusplus
+}
+#	endif /* __cplusplus */
+#endif /* HAVE_EXECVPE */





More information about the icinga-checkins mailing list