From dab652d0c66b35c171816ffff80c03d0537f7caa Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 19 Dec 2014 12:55:49 +0000 Subject: Updated to fix build problems with clang and FreeBSD 10.x --- srcx/injail.c | 1 + srcx/jails.c | 1 + srcx/jid.c | 1 + srcx/jps.c | 1 + srcx/util.c | 4 ++-- srcx/util.h | 2 ++ 6 files changed, 8 insertions(+), 2 deletions(-) (limited to 'srcx') diff --git a/srcx/injail.c b/srcx/injail.c index b96ee8f..1b92a63 100644 --- a/srcx/injail.c +++ b/srcx/injail.c @@ -39,6 +39,7 @@ #include #include +#include #include "util.h" diff --git a/srcx/jails.c b/srcx/jails.c index 40b12a7..8e063b6 100644 --- a/srcx/jails.c +++ b/srcx/jails.c @@ -47,6 +47,7 @@ #include #include #include +#include #include "util.h" diff --git a/srcx/jid.c b/srcx/jid.c index a637eec..fbe5e24 100644 --- a/srcx/jid.c +++ b/srcx/jid.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "util.h" diff --git a/srcx/jps.c b/srcx/jps.c index 3340726..9dcc9c2 100644 --- a/srcx/jps.c +++ b/srcx/jps.c @@ -49,6 +49,7 @@ #include #include #include +#include #include "util.h" diff --git a/srcx/util.c b/srcx/util.c index 6aad984..3361ffd 100644 --- a/srcx/util.c +++ b/srcx/util.c @@ -357,7 +357,7 @@ int run_overlay_command(const char* jail, const char* cmd, char* env[], else execle(cmd, cmd, NULL, env); - warn("%s%serror executing: %s: %s", jail ? jail : "", + warn("%s%serror executing: %s", jail ? jail : "", jail ? ": " : "", cmd); return 0; } @@ -516,7 +516,7 @@ int run_dup_command(const char* jail, const char* cmd, char* env[], } /* Or if there's an error or end of file */ - if(ret == -1 && errno != EAGAIN || ret == 0) + if((ret == -1 && errno != EAGAIN) || ret == 0) break; /* If the processes exited then break out */ diff --git a/srcx/util.h b/srcx/util.h index 91f2b49..f2fda07 100644 --- a/srcx/util.h +++ b/srcx/util.h @@ -68,5 +68,7 @@ int check_jail_command(const char* jail, const char* cmd); void ignore_signals(void); void unignore_signals(void); +int kvm_prepare_jail(struct xprison* xp); + #endif /* __UTIL_H__ */ -- cgit v1.2.3