From 633f43164d8245e388a71ab499aff4b3b2b79ceb Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 13 May 2018 18:24:57 +0200 Subject: make: git-receiver: fixed conversion from wait status to status code --- src/blogc-git-receiver/pre-receive.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/blogc-git-receiver') diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c index e8ac1d3..b059753 100644 --- a/src/blogc-git-receiver/pre-receive.c +++ b/src/blogc-git-receiver/pre-receive.c @@ -15,6 +15,7 @@ #include #include #include +#include "../common/compat.h" #include "../common/utils.h" #include "../common/stdin.h" #include "pre-receive-parser.h" @@ -197,7 +198,7 @@ bgr_pre_receive_hook(int argc, char *argv[]) char *build_cmd = NULL; if (0 == access("blogcfile", F_OK)) { int status_bmake = system("blogc-make -v 2> /dev/null > /dev/null"); - if (127 == WEXITSTATUS(status_bmake)) { + if (127 == bc_compat_status_code(status_bmake)) { fprintf(stderr, "error: failed to find blogc-make binary\n"); rv = 3; goto cleanup; @@ -209,12 +210,12 @@ bgr_pre_receive_hook(int argc, char *argv[]) const char *make_impl = NULL; int status_gmake = system("gmake -f /dev/null 2> /dev/null > /dev/null"); - if (127 != WEXITSTATUS(status_gmake)) { + if (127 != bc_compat_status_code(status_gmake)) { make_impl = "gmake"; } else { int status_make = system("make -f /dev/null 2> /dev/null > /dev/null"); - if (127 != WEXITSTATUS(status_make)) { + if (127 != bc_compat_status_code(status_make)) { make_impl = "make"; } } -- cgit v1.2.3-18-g5258