diff options
Diffstat (limited to 'kernel/tests/include/lapi/setns.h')
-rw-r--r-- | kernel/tests/include/lapi/setns.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/tests/include/lapi/setns.h b/kernel/tests/include/lapi/setns.h new file mode 100644 index 0000000..7b0a7af --- /dev/null +++ b/kernel/tests/include/lapi/setns.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + Copyright (c) 2020 Cyril Hrubis <chrubis@suse.cz> + */ + +#ifndef LAPI_SETNS_H__ +#define LAPI_SETNS_H__ + +#include "config.h" +#include "lapi/syscalls.h" +#include <sched.h> + +#ifndef HAVE_SETNS +int setns(int fd, int nstype) +{ + return tst_syscall(__NR_setns, fd, nstype); +} +#endif + +#endif /* LAPI_SETNS_H__ */ |