From: Blue Swirl <blauwirbel@gmail.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Lucas Meneghel Rodrigues <lmr@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] hw/i386: Fix broken build for non POSIX hosts
Date: Sat, 5 Jan 2013 12:15:49 +0000 [thread overview]
Message-ID: <CAAu8pHvWmAW+NVOmwgoiMWouMP7coJv40QoFjw=iHwSv5UZNew@mail.gmail.com> (raw)
In-Reply-To: <1357374823-25173-1-git-send-email-sw@weilnetz.de>
Thanks, applied.
On Sat, Jan 5, 2013 at 8:33 AM, Stefan Weil <sw@weilnetz.de> wrote:
> pc-testdev.c cannot be compiled with MinGW (and other non POSIX hosts):
>
> CC i386-softmmu/hw/i386/../pc-testdev.o
> qemu/hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found
> qemu/hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
> qemu/hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
> ...
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> v2
>
> This patch replaces my previous patch
>
> hw/i386: Fix broken build for MinGW
>
> Instead of disabling pc-testdev.o for non KVM hosts,
> this version only excludes the mprotect code for non
> POSIX hosts. Alex Graf suggested a similar solution.
>
> - Stefan
>
> hw/pc-testdev.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/pc-testdev.c b/hw/pc-testdev.c
> index 620c86c..1928489 100644
> --- a/hw/pc-testdev.c
> +++ b/hw/pc-testdev.c
> @@ -35,7 +35,10 @@
> * git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
> */
>
> +#include "config-host.h"
> +#if defined(CONFIG_POSIX)
> #include <sys/mman.h>
> +#endif
> #include "hw.h"
> #include "qdev.h"
> #include "isa.h"
> @@ -100,8 +103,10 @@ static void test_flush_page(void *opaque, hwaddr addr, uint64_t data,
>
> /* We might not be able to get the full page, only mprotect what we actually
> have mapped */
> +#if defined(CONFIG_POSIX)
> mprotect(a, page, PROT_NONE);
> mprotect(a, page, PROT_READ|PROT_WRITE);
> +#endif
> cpu_physical_memory_unmap(a, page, 0, 0);
> }
>
> --
> 1.7.10.4
>
>
prev parent reply other threads:[~2013-01-05 12:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-05 8:33 [Qemu-devel] [PATCH v2] hw/i386: Fix broken build for non POSIX hosts Stefan Weil
2013-01-05 12:15 ` Blue Swirl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAu8pHvWmAW+NVOmwgoiMWouMP7coJv40QoFjw=iHwSv5UZNew@mail.gmail.com' \
--to=blauwirbel@gmail.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=kraxel@redhat.com \
--cc=lmr@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).