diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-22 17:01:20 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-22 17:01:20 +0000 |
commit | fa760cfb01223f333a8553566d845b7a462c459b (patch) | |
tree | 20c7093841e3bf7445fb2c628a4334bc3ead221a /packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch | |
parent | e398e9063c713cb73ea3cc19aecc8d9138d6acf9 (diff) | |
parent | 70e5cf9476598fdf441d22adfd166e3ee90ae4c8 (diff) |
merge of '4ceb0ef60a086087bfe7a232b07d6fb71c3ccd04'
and 'eaf6fede3ee9af7cea4d430e426ee09da45e8f21'
Diffstat (limited to 'packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch')
-rw-r--r-- | packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch b/packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch new file mode 100644 index 0000000000..d9303e3464 --- /dev/null +++ b/packages/qemu/files/qemu-amd64-32b-mapping-0.9.0.patch @@ -0,0 +1,31 @@ +--- qemu.orig/linux-user/mmap.c ++++ qemu/linux-user/mmap.c +@@ -29,6 +29,10 @@ + + //#define DEBUG_MMAP + ++#ifndef MAP_32BIT ++#define MAP_32BIT 0 ++#endif ++ + /* NOTE: all the constants are the HOST ones, but addresses are target. */ + int target_mprotect(target_ulong start, target_ulong len, int prot) + { +@@ -234,7 +238,7 @@ + host_offset = offset & qemu_host_page_mask; + host_len = len + offset - host_offset; + host_start = (long)mmap(real_start ? g2h(real_start) : NULL, +- host_len, prot, flags, fd, host_offset); ++ host_len, prot, (flags | MAP_32BIT), fd, host_offset); + if (host_start == -1) + return host_start; + /* update start so that it points to the file position at 'offset' */ +@@ -388,7 +392,7 @@ + int prot; + + /* XXX: use 5 args syscall */ +- new_addr = (long)mremap(g2h(old_addr), old_size, new_size, flags); ++ new_addr = (long)mremap(g2h(old_addr), old_size, new_size, (flags | MAP_32BIT)); + if (new_addr == -1) + return new_addr; + new_addr = h2g(new_addr); |