Skip to contentSkip to conversation

hw/i386: Fix broken build for MinGW

PATCH Superseded Stefan Weil 3 participants 4 messages Jan 4, 2013 – Jan 7, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/i386: Fix broken build for MinGW

pc-testdev.c cannot be compiled with MinGW:

CC i386-softmmu/hw/i386/../pc-testdev.o
hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
...

---
 hw/i386/Makefile.objs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/Makefile.objs +1 -1
index 025803a..8f17763 100644
@@ -12,6 +12,6 @@ obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
 obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o
 obj-y += kvm/
 obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
-obj-y += pc-testdev.o
+obj-$(CONFIG_KVM) += pc-testdev.o
 
 obj-y := $(addprefix ../,$(obj-y))
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 9 lines · Stefan Weil

pc-testdev.c cannot be compiled with MinGW:

CC i386-softmmu/hw/i386/../pc-testdev.o
hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
...

+obj-$(CONFIG_KVM) += pc-testdev.o

CONFIG_POSIX is the better choice I think.

cheers,
Gerd

#2 lore raw

Am 07.01.2013 09:35, schrieb Gerd Hoffmann:

Quoted 9 lines · Stefan Weil
Quoted 7 lines

pc-testdev.c cannot be compiled with MinGW:

   CC    i386-softmmu/hw/i386/../pc-testdev.o

hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
...

Quoted 6 lines
Quoted 1 line

+obj-$(CONFIG_KVM) += pc-testdev.o

CONFIG_POSIX is the better choice I think.

cheers,
Gerd

I agree.

This patch was superseded by a newer one which indeed uses CONFIG_POSIX and was applied by Blue, see

http://patchwork.ozlabs.org/patch/209653/

Cheers,
Stefan

#3 lore raw
Quoted 20 lines · Stefan Weil

Am 07.01.2013 09:35, schrieb Gerd Hoffmann:

Quoted 10 lines · Stefan Weil
Quoted 8 lines

pc-testdev.c cannot be compiled with MinGW:

   CC    i386-softmmu/hw/i386/../pc-testdev.o

hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
...

Quoted 6 lines
Quoted 1 line

+obj-$(CONFIG_KVM) += pc-testdev.o

CONFIG_POSIX is the better choice I think.

cheers,
Gerd

I agree.

Quoted 7 lines

This patch was superseded by a newer one which indeed uses CONFIG_POSIX and was applied by Blue, see

http://patchwork.ozlabs.org/patch/209653/

Cheers,
Stefan

Ok, sorry about that, guys, and thanks for fixing things.

Lucas