xref: /aosp_15_r20/external/ltp/include/lapi/setns.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3   Copyright (c) 2020 Cyril Hrubis <[email protected]>
4  */
5 
6 #ifndef LAPI_SETNS_H__
7 #define LAPI_SETNS_H__
8 
9 #include "config.h"
10 #include "lapi/syscalls.h"
11 #include <sched.h>
12 
13 #ifndef HAVE_SETNS
setns(int fd,int nstype)14 static inline int setns(int fd, int nstype)
15 {
16 	return tst_syscall(__NR_setns, fd, nstype);
17 }
18 #endif
19 
20 #endif /* LAPI_SETNS_H__ */
21