about summary refs log tree commit diff
path: root/src/linux/setns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/setns.c')
-rw-r--r--src/linux/setns.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/linux/setns.c b/src/linux/setns.c
new file mode 100644
index 00000000..af3eb092
--- /dev/null
+++ b/src/linux/setns.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <sched.h>
+#include "syscall.h"
+#include "libc.h"
+
+int setns(int fd, int nstype)
+{
+        return syscall(SYS_setns, fd, nstype);
+}