1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci Copyright (c) 2020 Cyril Hrubis <chrubis@suse.cz> 4f08c3bdfSopenharmony_ci */ 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_ci#ifndef LAPI_SETNS_H__ 7f08c3bdfSopenharmony_ci#define LAPI_SETNS_H__ 8f08c3bdfSopenharmony_ci 9f08c3bdfSopenharmony_ci#include "config.h" 10f08c3bdfSopenharmony_ci#include "lapi/syscalls.h" 11f08c3bdfSopenharmony_ci#include <sched.h> 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ci#ifndef HAVE_SETNS 14f08c3bdfSopenharmony_cistatic inline int setns(int fd, int nstype) 15f08c3bdfSopenharmony_ci{ 16f08c3bdfSopenharmony_ci return tst_syscall(__NR_setns, fd, nstype); 17f08c3bdfSopenharmony_ci} 18f08c3bdfSopenharmony_ci#endif 19f08c3bdfSopenharmony_ci 20f08c3bdfSopenharmony_ci#endif /* LAPI_SETNS_H__ */ 21