qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] bsd-user: fix build


From: Blue Swirl
Subject: [Qemu-devel] [PATCH] bsd-user: fix build
Date: Sun, 24 Jun 2012 20:18:17 +0000

Link in oslib objects also for BSD user, but avoid using the version of
qemu_vmalloc() defined in oslib-posix.c.

Signed-off-by: Blue Swirl <address@hidden>
---
 Makefile.target |    2 +-
 oslib-posix.c   |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 8f12b0f..b81cba0 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -108,7 +108,7 @@ ifdef CONFIG_BSD_USER
 QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
 
 obj-y += bsd-user/
-obj-y += gdbstub.o user-exec.o
+obj-y += gdbstub.o user-exec.o $(oslib-obj-y)
 
 endif #CONFIG_BSD_USER
 
diff --git a/oslib-posix.c b/oslib-posix.c
index b6a3c7f..6b7ba64 100644
--- a/oslib-posix.c
+++ b/oslib-posix.c
@@ -105,6 +105,8 @@ 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)
 {
@@ -127,6 +129,7 @@ void *qemu_vmalloc(size_t size)
     trace_qemu_vmalloc(size, ptr);
     return ptr;
 }
+#endif
 
 void qemu_vfree(void *ptr)
 {
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]