* [Qemu-devel] [PATCH] bsd-user: avoid conflict with qemu_vmalloc
@ 2013-01-19 10:19 Blue Swirl
2013-01-20 7:28 ` Andreas Färber
0 siblings, 1 reply; 2+ messages in thread
From: Blue Swirl @ 2013-01-19 10:19 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel
Rename qemu_vmalloc() to bsd_vmalloc(), adjust the only user.
Remove #ifdeffery in oslib-posix.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
bsd-user/mmap.c | 4 ++--
util/oslib-posix.c | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 5d6cffc..aae8ea1 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 4f5ec67..b4152fb 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)
{
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] bsd-user: avoid conflict with qemu_vmalloc
2013-01-19 10:19 [Qemu-devel] [PATCH] bsd-user: avoid conflict with qemu_vmalloc Blue Swirl
@ 2013-01-20 7:28 ` Andreas Färber
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Färber @ 2013-01-20 7:28 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Am 19.01.2013 11:19, schrieb Blue Swirl:
> Rename qemu_vmalloc() to bsd_vmalloc(), adjust the only user.
>
> Remove #ifdeffery in oslib-posix.c.
>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Tested-by: Andreas Färber <andreas.faerber@web.de>
Fixes the build on OpenBSD 5.2 for me.
Thanks,
Andreas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-20 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-19 10:19 [Qemu-devel] [PATCH] bsd-user: avoid conflict with qemu_vmalloc Blue Swirl
2013-01-20 7:28 ` Andreas Färber
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.