summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2013-01-19 09:49:09 +0000
committerBlue Swirl <blauwirbel@gmail.com>2013-01-26 13:18:27 +0000
commit0360ccffbe41bd732b42a90cd04de63335933bea (patch)
tree935ae23c73253fd16cf324bdc80b18269736bb58
parent82cb6b041c307bd96c067147af69cd98be91a682 (diff)
downloadfocaccia-qemu-0360ccffbe41bd732b42a90cd04de63335933bea.tar.gz
focaccia-qemu-0360ccffbe41bd732b42a90cd04de63335933bea.zip
bsd-user: avoid conflict with qemu_vmalloc
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>
-rw-r--r--bsd-user/mmap.c4
-rw-r--r--util/oslib-posix.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 5d6cffc458..aae8ea10be 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -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;
 }
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 4f5ec6788b..b4152fb33c 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -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)
 {