bsd-user: fix build
authorBlue Swirl <blauwirbel@gmail.com>
Sun, 24 Jun 2012 20:15:05 +0000 (20:15 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Thu, 28 Jun 2012 20:28:36 +0000 (20:28 +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 <blauwirbel@gmail.com>
Makefile.target
oslib-posix.c

index 127d5733912ca8e45a5377651b4d8bbc628f2a71..74f7a4a1706cd51caa3c0c7216a4b3e013937627 100644 (file)
@@ -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
 
index b6a3c7fc55207ab83afd1fd08447dce2fff8107f..6b7ba646c7bd30ab193b81f7e3f5be5dd6d43712 100644 (file)
@@ -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)
 {