]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Support __NR_set_ns as well.
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 24 Jan 2014 18:27:26 +0000 (13:27 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 24 Jan 2014 18:27:26 +0000 (13:27 -0500)
Apparently some older systems didn't have __NR_setns but had __NR_set_ns.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/utils.h

index dd81c62643f5eb316d72f68e6088b05d8950c764..a07339f7367d4b456ac8d369e1e24caf47d03063 100644 (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;