From: Blue Swirl Date: Sat, 19 Jan 2013 09:49:09 +0000 (+0000) Subject: bsd-user: avoid conflict with qemu_vmalloc X-Git-Tag: v1.4.0-rc0~102 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0360ccffbe41bd732b42a90cd04de63335933bea;p=qemu.git 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 Signed-off-by: Blue Swirl --- diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 5d6cffc45..aae8ea10b 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 4f5ec6788..b4152fb33 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) {