summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2014-04-06 15:56:23 +0000
committerJuergen Lock <nox@FreeBSD.org>2014-04-06 15:56:23 +0000
commit48a18b5a848ac7a9efaf981eb6b34a4fc46e1b85 (patch)
tree9490176b0e14a15fb93b94707816db976885ccc4 /emulators/qemu-devel/files/extra-patch-bsd-user-mmap.c
parent- Port is stage safe (diff)
- Add two more bsd-user patches, with these sbruno can now build 32bit
mips packages in poudriere (after adding 32bit qemu-mips support to it), tho he used his git repo that has the same patches: (and sson's binmisc code) https://github.com/seanbruno/qemu/tree/bsd-user/bsd-user https://wiki.freebsd.org/QemuUserModeHowTo - Fixup comment s/daddu/addu/g . [1] - Wrap mmap() allocation search to low memory to avoid another assert. - Bump PORTREVISION. Submitted by: sbruno [1] Obtained from: https://github.com/seanbruno/qemu/commit/6201cb17ad905dffee1b2eb76f58fb032e99b2a1#diff-3ed994b5af908e5063b9d5724056d1b4 [1]
Notes
Notes: svn path=/head/; revision=350371
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.c18
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)