aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/blogc-git-receiver/pre-receive.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 69a337b..55e860b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,7 @@ GIT_RECEIVER="disabled"
AC_ARG_ENABLE([git-receiver], AS_HELP_STRING([--enable-git-receiver],
[build blogc-git-receiver tool]))
AS_IF([test "x$enable_git_receiver" = "xyes"], [
- AC_CHECK_HEADERS([sys/types.h sys/stat.h time.h libgen.h unistd.h errno.h dirent.h], [
+ AC_CHECK_HEADERS([sys/types.h sys/stat.h sys/wait.h time.h libgen.h unistd.h errno.h dirent.h], [
GIT_RECEIVER="enabled"
have_git_receiver=yes
], [
diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c
index 6fd396f..5c0b3b7 100644
--- a/src/blogc-git-receiver/pre-receive.c
+++ b/src/blogc-git-receiver/pre-receive.c
@@ -12,6 +12,7 @@
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include <dirent.h>
#include <time.h>
#include "../common/utils.h"
@@ -152,10 +153,10 @@ bgr_pre_receive_hook(int argc, char *argv[])
const char *make_impl = NULL;
- if (127 != system("gmake -f /dev/null &> /dev/null")) {
+ if (127 != WEXITSTATUS(system("gmake -f /dev/null &> /dev/null"))) {
make_impl = "gmake";
}
- else if (127 != system("make -f /dev/null &> /dev/null")) {
+ else if (127 != WEXITSTATUS(system("make -f /dev/null &> /dev/null"))) {
make_impl = "make";
}