]> git.proxmox.com Git - qemu.git/commitdiff
bsd-user: avoid conflict with qemu_vmalloc
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 19 Jan 2013 09:49:09 +0000 (09:49 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 26 Jan 2013 13:18:27 +0000 (13:18 +0000)
Rename qemu_vmalloc() to bsd_vmalloc(), adjust the only user.

Remove #ifdeffery in oslib-posix.c.

Tested-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
bsd-user/mmap.c
util/oslib-posix.c

index 5d6cffc45857326fabef87ad177377c9ab245758..aae8ea10beeb0a2abc9cd2c4c3dc830c64f130ea 100644 (file)
@@ -74,7 +74,7 @@ void mmap_unlock(void)
 }
 #endif
 
-void *qemu_vmalloc(size_t size)
+static void *bsd_vmalloc(size_t size)
 {
     void *p;
     mmap_lock();
@@ -98,7 +98,7 @@ void *g_malloc(size_t size)
 {
     char * p;
     size += 16;
-    p = qemu_vmalloc(size);
+    p = bsd_vmalloc(size);
     *(size_t *)p = size;
     return p + 16;
 }
index 4f5ec6788b6513e3113eab18107c58608cb0ee27..b4152fb33cdf438df5f8edde93de0bd99be51947 100644 (file)
@@ -105,8 +105,6 @@ void *qemu_memalign(size_t alignment, size_t size)
     return ptr;
 }
 
-/* conflicts with qemu_vmalloc in bsd-user/mmap.c */
-#if !defined(CONFIG_BSD_USER)
 /* alloc shared memory pages */
 void *qemu_vmalloc(size_t size)
 {
@@ -129,7 +127,6 @@ void *qemu_vmalloc(size_t size)
     trace_qemu_vmalloc(size, ptr);
     return ptr;
 }
-#endif
 
 void qemu_vfree(void *ptr)
 {