aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 13:47:52 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 13:47:52 +0000
commit06177d36ed948fe4d3d4dfb6b7a37d3d87ce6ed3 (patch)
treed47ac81ed90ad54fca95890331b043278abf3af0
parent45d242b65b1636504c6f8dadad55a83a92c6f323 (diff)
Fix a compiler error with DEBUG_REMAP enabled (Thayne Harbaugh).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3845 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--linux-user/qemu.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index c0780084ba..b33ad8942f 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -6,6 +6,11 @@
#include "cpu.h"
+#undef DEBUG_REMAP
+#ifdef DEBUG_REMAP
+#include <stdlib.h>
+#endif /* DEBUG_REMAP */
+
#ifdef TARGET_ABI32
typedef uint32_t abi_ulong;
typedef int32_t abi_long;
@@ -370,7 +375,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr,
if (host_ptr == g2h(guest_addr))
return;
if (len > 0)
- memcpy(g2h(guest_ptr), host_ptr, len);
+ memcpy(g2h(guest_addr), host_ptr, len);
free(host_ptr);
#endif
}