Commit 06177d36ed948fe4d3d4dfb6b7a37d3d87ce6ed3
1 parent
45d242b6
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
Showing
1 changed file
with
6 additions
and
1 deletions
linux-user/qemu.h
... | ... | @@ -6,6 +6,11 @@ |
6 | 6 | |
7 | 7 | #include "cpu.h" |
8 | 8 | |
9 | +#undef DEBUG_REMAP | |
10 | +#ifdef DEBUG_REMAP | |
11 | +#include <stdlib.h> | |
12 | +#endif /* DEBUG_REMAP */ | |
13 | + | |
9 | 14 | #ifdef TARGET_ABI32 |
10 | 15 | typedef uint32_t abi_ulong; |
11 | 16 | typedef int32_t abi_long; |
... | ... | @@ -370,7 +375,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr, |
370 | 375 | if (host_ptr == g2h(guest_addr)) |
371 | 376 | return; |
372 | 377 | if (len > 0) |
373 | - memcpy(g2h(guest_ptr), host_ptr, len); | |
378 | + memcpy(g2h(guest_addr), host_ptr, len); | |
374 | 379 | free(host_ptr); |
375 | 380 | #endif |
376 | 381 | } | ... | ... |