Fix compiling without MREMAP_FIXED
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 11 Dec 2008 19:12:25 +0000 (19:12 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 11 Dec 2008 19:12:25 +0000 (19:12 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5979 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/mmap.c

index aad00e6..00a941e 100644 (file)
@@ -546,6 +546,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
 
     mmap_lock();
 
+#if defined(MREMAP_FIXED)
     if (flags & MREMAP_FIXED)
         host_addr = mremap(g2h(old_addr), old_size, new_size,
                            flags, new_addr);
@@ -560,7 +561,9 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
         } else
             host_addr = mremap(g2h(old_addr), old_size, new_size,
                                flags | MREMAP_FIXED, g2h(mmap_start));
-    } else {
+    } else
+#endif
+    {
         host_addr = mremap(g2h(old_addr), old_size, new_size, flags);
         /* Check if address fits target address space */
         if ((unsigned long)host_addr + new_size > (abi_ulong)-1) {