diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2010-03-29 02:12:51 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-04-01 21:51:58 +0200 |
commit | 60e99246d6b4d1de32aec3281483cdd85b415570 (patch) | |
tree | eceb5960b58ccc461b6b242bd9c6a66e11db2e7a /linux-user/syscall.c | |
parent | 9bc6304c156dcc01c619672ca33d7152bb18bcb9 (diff) |
linux-user/ia64: workaround ia64 strangenesses
ia64 has some strangenesses that need to be workaround:
- it has a __clone2() syscall instead of the using clone() one, with
different arguments, and which is not declared in the usual headers.
- ucontext.uc_sigmask is declared with type long int, while it is
actually of type sigset_t.
- uc_mcontext, uc_sigmask, uc_stack, uc_link are declared using #define,
which clashes with the target_ucontext fields. Change their names to
tuc_*, as already done for some target architectures.
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 80acf70ce8..5640ba696b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -41,6 +41,10 @@ #include <sys/swap.h> #include <signal.h> #include <sched.h> +#ifdef __ia64__ +int __clone2(int (*fn)(void *), void *child_stack_base, + size_t stack_size, int flags, void *arg, ...); +#endif #include <sys/socket.h> #include <sys/un.h> #include <sys/uio.h> @@ -3628,7 +3632,7 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp, return -EINVAL; /* This is probably going to die very quickly, but do it anyway. */ #ifdef __ia64__ - ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); + ret = __clone2(clone_func, new_stack, NEW_STACK_SIZE, flags, new_env); #else ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); #endif |