summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_isolation.c
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2022-09-13 13:17:16 +0400
committerKonstantin Pavlov <thresh@nginx.com>2022-09-13 13:17:16 +0400
commitce964aa30b163e2b3263c5af57c1a6dae7d0cebb (patch)
tree26bf70c1a5991f6471fc4caed8628e068fdc0b7b /src/nxt_isolation.c
parenteba4c3c98fa1bf275d94df8c727f70692ae7eae1 (diff)
parent38bd7e76a134084ab95a4ee3125af1ccd7b35864 (diff)
downloadunit-1.28.0-1.tar.gz
unit-1.28.0-1.tar.bz2
Merged with the default branch.1.28.0-1
Diffstat (limited to '')
-rw-r--r--src/nxt_isolation.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_isolation.c b/src/nxt_isolation.c
index e3cb1f22..796da4c6 100644
--- a/src/nxt_isolation.c
+++ b/src/nxt_isolation.c
@@ -7,7 +7,7 @@
#include <nxt_process.h>
#include <nxt_isolation.h>
-#if (NXT_HAVE_PIVOT_ROOT)
+#if (NXT_HAVE_MNTENT_H)
#include <mntent.h>
#endif
@@ -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)
@@ -1003,11 +1003,11 @@ fail:
nxt_inline int
nxt_pivot_root(const char *new_root, const char *old_root)
{
- return syscall(__NR_pivot_root, new_root, old_root);
+ return syscall(SYS_pivot_root, new_root, old_root);
}
-#else /* !(NXT_HAVE_PIVOT_ROOT) || !(NXT_HAVE_CLONE_NEWNS) */
+#else /* !(NXT_HAVE_LINUX_PIVOT_ROOT) || !(NXT_HAVE_CLONE_NEWNS) */
nxt_int_t