Isolation: fixed build when features aren't detected.

This commit is contained in:
Tiago Natel de Moura
2020-06-23 12:11:27 +01:00
parent 0326cefef5
commit f8ba5d6c00
5 changed files with 116 additions and 129 deletions

View File

@@ -35,17 +35,14 @@ static void nxt_process_created_error(nxt_task_t *task,
#if (NXT_HAVE_ISOLATION_ROOTFS)
static nxt_int_t nxt_process_chroot(nxt_task_t *task, const char *path);
#endif
#if (NXT_HAVE_PIVOT_ROOT)
#if (NXT_HAVE_PIVOT_ROOT) && (NXT_HAVE_CLONE_NEWNS)
static nxt_int_t nxt_process_pivot_root(nxt_task_t *task, const char *rootfs);
static nxt_int_t nxt_process_private_mount(nxt_task_t *task,
const char *rootfs);
#endif
#if (NXT_HAVE_PIVOT_ROOT)
static int nxt_pivot_root(const char *new_root, const char *old_root);
#endif
#endif
/* A cached process pid. */
nxt_pid_t nxt_pid;
@@ -590,11 +587,6 @@ nxt_process_change_root(nxt_task_t *task, nxt_process_t *process)
#endif
#endif
#if (NXT_HAVE_ISOLATION_ROOTFS)
static nxt_int_t
nxt_process_chroot(nxt_task_t *task, const char *path)
{
@@ -625,8 +617,6 @@ nxt_process_unmount_all(nxt_task_t *task, nxt_process_t *process)
}
}
#endif
#if (NXT_HAVE_PIVOT_ROOT) && (NXT_HAVE_CLONE_NEWNS)
@@ -856,6 +846,8 @@ nxt_pivot_root(const char *new_root, const char *old_root)
#endif
#endif
static nxt_int_t
nxt_process_send_ready(nxt_task_t *task, nxt_process_t *process)