summaryrefslogtreecommitdiff
path: root/cumulus
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-08-04 10:07:33 -0300
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-08-07 21:05:26 -0400
commit8f500a1cf156c6033f2e0b1ef40db09f9d6f34a2 (patch)
tree9d115beedfdb9638e0dbc51b76bdec2f59752d0e /cumulus
parent6b8a5694d3f138f0d32026d56d24a129a21c5da8 (diff)
*: fix trivial build errors on *BSD
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'cumulus')
-rw-r--r--cumulus/start-stop-daemon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cumulus/start-stop-daemon.c b/cumulus/start-stop-daemon.c
index ea63fbc217..4d447d9051 100644
--- a/cumulus/start-stop-daemon.c
+++ b/cumulus/start-stop-daemon.c
@@ -56,8 +56,9 @@
#include <limits.h>
#include <assert.h>
#include <ctype.h>
-#include <error.h>
+#ifdef linux
#include <linux/sched.h>
+#endif
static int testmode = 0;
static int quietmode = 0;
@@ -241,6 +242,7 @@ next_dirname(const char *s)
return cur;
}
+#ifdef linux
static void
add_namespace(const char *path)
{
@@ -270,6 +272,7 @@ add_namespace(const char *path)
namespace->nstype = nstype;
LIST_INSERT_HEAD(&namespace_head, namespace, list);
}
+#endif
#ifdef HAVE_LXC
static void
@@ -567,7 +570,9 @@ parse_options(int argc, char * const *argv)
changeroot = optarg;
break;
case 'd': /* --namespace /.../<ipcns>|<netns>|<utsns>/name */
+#ifdef linux
add_namespace(optarg);
+#endif
break;
case 'N': /* --nice */
nicelevel = atoi(optarg);