This fixes a compile error for a variable that wasn't changed (it was
previously renamed to make the variable more descriptive).  It also adds
"#include <stdlib>" for prototypes of malloc() and free().
Index: qemu/linux-user/qemu.h
===================================================================
--- qemu.orig/linux-user/qemu.h	2007-12-18 09:11:41.000000000 -0700
+++ qemu/linux-user/qemu.h	2007-12-18 09:26:26.000000000 -0700
@@ -7,6 +7,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;
@@ -374,7 +379,7 @@
     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
 }

Reply via email to