aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-05-13 18:24:57 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-05-13 18:24:57 +0200
commit633f43164d8245e388a71ab499aff4b3b2b79ceb (patch)
treeea2c7d11dc5219002e0492a7e60a619d2865f9cd /src/blogc-git-receiver
parent097fc9bdb386705a63a8021d5467266a70e22a6e (diff)
downloadblogc-633f43164d8245e388a71ab499aff4b3b2b79ceb.tar.gz
blogc-633f43164d8245e388a71ab499aff4b3b2b79ceb.tar.bz2
blogc-633f43164d8245e388a71ab499aff4b3b2b79ceb.zip
make: git-receiver: fixed conversion from wait status to status code
Diffstat (limited to 'src/blogc-git-receiver')
-rw-r--r--src/blogc-git-receiver/pre-receive.c7
1 files changed, 4 insertions, 3 deletions
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 <dirent.h>
#include <time.h>
#include <libgen.h>
+#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";
}
}