* [Qemu-devel] [6434] Fix bsd-user compile like r6412
@ 2009-01-24 20:19 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2009-01-24 20:19 UTC (permalink / raw)
To: qemu-devel
Revision: 6434
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6434
Author: blueswir1
Date: 2009-01-24 20:19:18 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
Fix bsd-user compile like r6412
Modified Paths:
--------------
trunk/bsd-user/mmap.c
Modified: trunk/bsd-user/mmap.c
===================================================================
--- trunk/bsd-user/mmap.c 2009-01-24 18:21:08 UTC (rev 6433)
+++ trunk/bsd-user/mmap.c 2009-01-24 20:19:18 UTC (rev 6434)
@@ -122,6 +122,19 @@
munmap(p, *p);
}
+void *qemu_realloc(void *ptr, size_t size)
+{
+ size_t old_size, copy;
+ void *new_ptr;
+
+ old_size = *(size_t *)((char *)ptr - 16);
+ copy = old_size < size ? old_size : size;
+ new_ptr = qemu_malloc(size);
+ memcpy(new_ptr, ptr, copy);
+ qemu_free(ptr);
+ return new_ptr;
+}
+
/* NOTE: all the constants are the HOST ones, but addresses are target. */
int target_mprotect(abi_ulong start, abi_ulong len, int prot)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-24 20:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-24 20:19 [Qemu-devel] [6434] Fix bsd-user compile like r6412 Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).