From e561e1b9872626189df7911fa8467296d9a22eed Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 11 Oct 2016 02:56:19 +0200 Subject: git-receiver: fix previous patch --- configure.ac | 2 +- src/blogc-git-receiver/pre-receive.c | 5 +++-- 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 #include #include +#include #include #include #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"; } -- cgit v1.2.3-18-g5258