From 6fb883e8e3ce8fc661e4bb9f068565b4ccd97abf Mon Sep 17 00:00:00 2001 From: bellard Date: Wed, 9 Jul 2003 17:12:39 +0000 Subject: ARM fix: mmap git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@315 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/syscall.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'linux-user/syscall.c') diff --git a/linux-user/syscall.c b/linux-user/syscall.c index cd3fdf5535..932fe4658d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1791,8 +1791,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, goto unimplemented; case TARGET_NR_readdir: goto unimplemented; -#ifdef TARGET_I386 case TARGET_NR_mmap: +#if defined(TARGET_I386) || defined(TARGET_ARM) { uint32_t v1, v2, v3, v4, v5, v6, *vptr; vptr = (uint32_t *)arg1; @@ -1806,13 +1806,14 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, target_to_host_bitmask(v4, mmap_flags_tbl), v5, v6)); } - break; -#endif -#ifdef TARGET_I386 - case TARGET_NR_mmap2: #else - case TARGET_NR_mmap: + ret = get_errno(target_mmap(arg1, arg2, arg3, + target_to_host_bitmask(arg4, mmap_flags_tbl), + arg5, + arg6)); #endif + break; + case TARGET_NR_mmap2: ret = get_errno(target_mmap(arg1, arg2, arg3, target_to_host_bitmask(arg4, mmap_flags_tbl), arg5, -- cgit v1.2.3