Switch the flags and sp for sys_clone for s390.
Without this, lxc-execute gets a segfault on clone (of course).
With this, it succeeds.
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
# error "unsupported architecture"
# endif
#endif
-#if __i386__ || __x86_64__ || __s390__ || __powerpc__
+#if __i386__ || __x86_64__ || __powerpc__
# define fork_ns(flags) syscall(SYS_clone, flags|SIGCHLD, NULL)
+#elif __s390__
+# define fork_ns(flags) syscall(SYS_clone, NULL, flags|SIGCHLD)
#elif __ia64__
# define fork_ns(flags) syscall(SYS_clone2, flags|SIGCHLD, NULL)
#else
# error "unsupported architecture"
# endif
#endif
-#if __i386__ || __x86_64__ || __s390__ || __powerpc__
+#if __i386__ || __x86_64__ || __powerpc__
# define fork_ns(flags) syscall(SYS_clone, flags|SIGCHLD, NULL);
+#elif __s390__
+# define fork_ns(flags) syscall(SYS_clone, NULL, flags|SIGCHLD)
#elif __ia64__
# define fork_ns(flags) syscall(SYS_clone2, flags|SIGCHLD, NULL);
#else