mirror of
https://github.com/fluencelabs/musl
synced 2025-06-24 12:12:04 +00:00
add linux-specific unshare syscall wrapper
This commit is contained in:
@ -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
|
||||
|
8
src/linux/unshare.c
Normal file
8
src/linux/unshare.c
Normal file
@ -0,0 +1,8 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <sched.h>
|
||||
#include "syscall.h"
|
||||
|
||||
int unshare(int flags)
|
||||
{
|
||||
return syscall(SYS_unshare, flags);
|
||||
}
|
Reference in New Issue
Block a user