From: Rich Felker Date: Sun, 29 Apr 2012 23:54:03 +0000 (-0400) Subject: add linux-specific unshare syscall wrapper X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=50da5c264fd84ea2de8cf75bf39ceb81a4eecd71 add linux-specific unshare syscall wrapper --- diff --git a/include/sched.h b/include/sched.h index 7b3f1600..e411c92b 100644 --- a/include/sched.h +++ b/include/sched.h @@ -56,6 +56,7 @@ int sched_yield(void); #define CLONE_NEWNET 0x40000000 #define CLONE_IO 0x80000000 int clone (int (*)(void *), void *, int, void *, ...); +int unshare(int); #endif #ifdef __cplusplus diff --git a/src/linux/unshare.c b/src/linux/unshare.c new file mode 100644 index 00000000..3861db3b --- /dev/null +++ b/src/linux/unshare.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include +#include "syscall.h" + +int unshare(int flags) +{ + return syscall(SYS_unshare, flags); +}