| /* Compat code so unshare and setns can be used with older libcs */ |
| #ifndef UTIL_LINUX_NAMESPACE_H |
| # define UTIL_LINUX_NAMESPACE_H |
| # define CLONE_NEWNS 0x00020000 |
| # define CLONE_NEWUTS 0x04000000 |
| # define CLONE_NEWIPC 0x08000000 |
| # define CLONE_NEWNET 0x40000000 |
| # define CLONE_NEWUSER 0x10000000 |
| # define CLONE_NEWPID 0x20000000 |
| # include <sys/syscall.h> |
| static inline int unshare(int flags) |
| return syscall(SYS_unshare, flags); |
| # include <sys/syscall.h> |
| static inline int setns(int fd, int nstype) |
| return syscall(SYS_setns, fd, nstype); |
| #endif /* UTIL_LINUX_NAMESPACE_H */ |