diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-11 02:56:19 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-11 02:56:19 +0200 |
commit | e561e1b9872626189df7911fa8467296d9a22eed (patch) | |
tree | bfd8197a33729a343d5c446036aa7cab6c34f840 | |
parent | 8e6c611dfb402ce735dfea865f8920a723562a3d (diff) | |
download | blogc-e561e1b9872626189df7911fa8467296d9a22eed.tar.gz blogc-e561e1b9872626189df7911fa8467296d9a22eed.tar.bz2 blogc-e561e1b9872626189df7911fa8467296d9a22eed.zip |
git-receiver: fix previous patch
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | 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 <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"; } |