Commit 5caf7bb2c481f43a9d019732610751bc22913eba
1 parent
85df0de4
Fix compiling without MREMAP_FIXED
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5979 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
1 deletions
linux-user/mmap.c
... | ... | @@ -546,6 +546,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, |
546 | 546 | |
547 | 547 | mmap_lock(); |
548 | 548 | |
549 | +#if defined(MREMAP_FIXED) | |
549 | 550 | if (flags & MREMAP_FIXED) |
550 | 551 | host_addr = mremap(g2h(old_addr), old_size, new_size, |
551 | 552 | flags, new_addr); |
... | ... | @@ -560,7 +561,9 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, |
560 | 561 | } else |
561 | 562 | host_addr = mremap(g2h(old_addr), old_size, new_size, |
562 | 563 | flags | MREMAP_FIXED, g2h(mmap_start)); |
563 | - } else { | |
564 | + } else | |
565 | +#endif | |
566 | + { | |
564 | 567 | host_addr = mremap(g2h(old_addr), old_size, new_size, flags); |
565 | 568 | /* Check if address fits target address space */ |
566 | 569 | if ((unsigned long)host_addr + new_size > (abi_ulong)-1) { | ... | ... |