Support __NR_set_ns as well.

Apparently some older systems didn't have __NR_setns but had __NR_set_ns.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-01-24 13:27:26 -05:00
parent e43157b4b2
commit 92e23841a2
No known key found for this signature in database
GPG Key ID: C638974D64792D67

View File

@ -56,6 +56,8 @@ static inline int setns(int fd, int nstype)
{
#ifdef __NR_setns
return syscall(__NR_setns, fd, nstype);
#elif __NR_set_ns
return syscall(__NR_set_ns, fd, nstype);
#else
errno = ENOSYS;
return -1;