summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--auto/isolation5
-rw-r--r--src/nxt_isolation.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/auto/isolation b/auto/isolation
index 6debdc3b..384f7ef1 100644
--- a/auto/isolation
+++ b/auto/isolation
@@ -61,11 +61,14 @@ fi
nxt_feature="Linux pivot_root()"
-nxt_feature_name=NXT_HAVE_PIVOT_ROOT
+nxt_feature_name=NXT_HAVE_LINUX_PIVOT_ROOT
nxt_feature_run=no
nxt_feature_incs=
nxt_feature_libs=
nxt_feature_test="#include <sys/syscall.h>
+ #if !defined(__linux__)
+ # error
+ #endif
int main() {
return SYS_pivot_root;
diff --git a/src/nxt_isolation.c b/src/nxt_isolation.c
index 5a0714ff..796da4c6 100644
--- a/src/nxt_isolation.c
+++ b/src/nxt_isolation.c
@@ -45,7 +45,7 @@ static int nxt_cdecl nxt_isolation_mount_compare(const void *v1,
const void *v2);
static void nxt_isolation_unmount_all(nxt_task_t *task, nxt_process_t *process);
-#if (NXT_HAVE_PIVOT_ROOT) && (NXT_HAVE_CLONE_NEWNS)
+#if (NXT_HAVE_LINUX_PIVOT_ROOT) && (NXT_HAVE_CLONE_NEWNS)
static nxt_int_t nxt_isolation_pivot_root(nxt_task_t *task, const char *rootfs);
static nxt_int_t nxt_isolation_make_private_mount(nxt_task_t *task,
const char *rootfs);
@@ -752,7 +752,7 @@ undo:
}
-#if (NXT_HAVE_PIVOT_ROOT) && (NXT_HAVE_CLONE_NEWNS)
+#if (NXT_HAVE_LINUX_PIVOT_ROOT) && (NXT_HAVE_CLONE_NEWNS)
nxt_int_t
nxt_isolation_change_root(nxt_task_t *task, nxt_process_t *process)
@@ -1007,7 +1007,7 @@ nxt_pivot_root(const char *new_root, const char *old_root)
}
-#else /* !(NXT_HAVE_PIVOT_ROOT) || !(NXT_HAVE_CLONE_NEWNS) */
+#else /* !(NXT_HAVE_LINUX_PIVOT_ROOT) || !(NXT_HAVE_CLONE_NEWNS) */
nxt_int_t