提交 0360ccff 编写于 作者: B Blue Swirl

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: NAndreas Färber <andreas.faerber@web.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 82cb6b04
......@@ -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;
}
......
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册