From: Daniel Lezcano Date: Thu, 5 Jan 2012 21:45:32 +0000 (+0100) Subject: Fix ia64 clone X-Git-Tag: lxc-0.8.0-rc2~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92c64f7ed5663756f3c72fef4f38349111cb2d3f;p=thirdparty%2Flxc.git Fix ia64 clone Fix the stack address for ia64. Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/namespace.c b/src/lxc/namespace.c index aca29d4f8..6512685d0 100644 --- a/src/lxc/namespace.c +++ b/src/lxc/namespace.c @@ -67,14 +67,14 @@ pid_t lxc_clone(int (*fn)(void *), void *arg, int flags) }; long stack_size = sysconf(_SC_PAGESIZE); - void *stack = alloca(stack_size) + stack_size; + void *stack = alloca(stack_size); pid_t ret; #ifdef __ia64__ ret = __clone2(do_clone, stack, stack_size, flags | SIGCHLD, &clone_arg); #else - ret = clone(do_clone, stack, flags | SIGCHLD, &clone_arg); + ret = clone(do_clone, stack + stack_size, flags | SIGCHLD, &clone_arg); #endif if (ret < 0) ERROR("failed to clone(0x%x): %s", flags, strerror(errno));