Commit 6fb883e8e3ce8fc661e4bb9f068565b4ccd97abf

Authored by bellard
1 parent 6e295807

ARM fix: mmap


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@315 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 6 deletions
linux-user/syscall.c
... ... @@ -1791,8 +1791,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
1791 1791 goto unimplemented;
1792 1792 case TARGET_NR_readdir:
1793 1793 goto unimplemented;
1794   -#ifdef TARGET_I386
1795 1794 case TARGET_NR_mmap:
  1795 +#if defined(TARGET_I386) || defined(TARGET_ARM)
1796 1796 {
1797 1797 uint32_t v1, v2, v3, v4, v5, v6, *vptr;
1798 1798 vptr = (uint32_t *)arg1;
... ... @@ -1806,13 +1806,14 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
1806 1806 target_to_host_bitmask(v4, mmap_flags_tbl),
1807 1807 v5, v6));
1808 1808 }
1809   - break;
1810   -#endif
1811   -#ifdef TARGET_I386
1812   - case TARGET_NR_mmap2:
1813 1809 #else
1814   - case TARGET_NR_mmap:
  1810 + ret = get_errno(target_mmap(arg1, arg2, arg3,
  1811 + target_to_host_bitmask(arg4, mmap_flags_tbl),
  1812 + arg5,
  1813 + arg6));
1815 1814 #endif
  1815 + break;
  1816 + case TARGET_NR_mmap2:
1816 1817 ret = get_errno(target_mmap(arg1, arg2, arg3,
1817 1818 target_to_host_bitmask(arg4, mmap_flags_tbl),
1818 1819 arg5,
... ...