diff options
Diffstat (limited to 'emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c')
| -rw-r--r-- | emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c b/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c new file mode 100644 index 000000000000..9370e5bd7fd3 --- /dev/null +++ b/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c @@ -0,0 +1,18 @@ +--- a/bsd-user/mmap.c ++++ b/bsd-user/mmap.c +@@ -238,8 +238,13 @@ abi_ulong mmap_find_vma(abi_ulong start, + for (addr1 = addr; addr1 < (addr + size); addr1 += TARGET_PAGE_SIZE) { + prot |= page_get_flags(addr1); + } +- if (prot == 0) +- break; ++ if (prot == 0) { ++ if (reserved_va && addr + size >= reserved_va) { ++ addr = 0; ++ } else { ++ break; ++ } ++ } + addr += qemu_host_page_size; + /* we found nothing */ + if (addr == addr_start) |
