summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2014-12-19 12:55:49 +0000
committerStef Walter <stef@thewalter.net>2014-12-19 12:57:44 +0000
commitdab652d0c66b35c171816ffff80c03d0537f7caa (patch)
treea15a55ba6d4a8982fa447f1dd0df81e2ff907a58
parent291114c12df4c31ddb6567cd243c811ca8978b93 (diff)
Updated to fix build problems with clang and FreeBSD 10.xHEADmaster
-rw-r--r--.gitignore2
-rw-r--r--srcx/injail.c1
-rw-r--r--srcx/jails.c1
-rw-r--r--srcx/jid.c1
-rw-r--r--srcx/jps.c1
-rw-r--r--srcx/util.c4
-rw-r--r--srcx/util.h2
7 files changed, 10 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 39d1d35..adacb17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*.o
# /
/stamp-*
@@ -17,6 +18,7 @@
/*.tar.gz
/missing
/install-sh
+/compile
# /src/
/src/Makefile.in
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 <stdlib.h>
#include <stdio.h>
+#include <err.h>
#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 <kvm.h>
#include <paths.h>
#include <errno.h>
+#include <err.h>
#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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <err.h>
#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 <kvm.h>
#include <paths.h>
#include <limits.h>
+#include <err.h>
#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__ */