qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] os-posix: include sys/mman.h
Date: Mon, 6 Jun 2016 18:53:56 +0100	[thread overview]
Message-ID: <CAFEAcA9R2eQBhifhTqhqCE2Skxs2mFHAdeWXtzsdz2=TOgJwkQ@mail.gmail.com> (raw)
In-Reply-To: <1465233355-8046-1-git-send-email-pbonzini@redhat.com>

On 6 June 2016 at 18:15, Paolo Bonzini <pbonzini@redhat.com> wrote:
> qemu/osdep.h checks whether MAP_ANONYMOUS is defined, but this check
> is bogus without a previous inclusion of sys/mman.h.  Include it in
> sysemu/os-posix.h and remove it from everywhere else.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

> diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
> index 0fe8eda..4f4ce31 100644
> --- a/block/qcow2-cache.c
> +++ b/block/qcow2-cache.c
> @@ -26,7 +26,6 @@
>  #include "qemu/osdep.h"
>
>  #if defined(CONFIG_MADVISE) || defined(CONFIG_POSIX_MADVISE)
> -#include <sys/mman.h>
>  #endif

We end up with an empty #if..#endif block here.

> --- a/hw/misc/pc-testdev.c
> +++ b/hw/misc/pc-testdev.c
> @@ -37,7 +37,6 @@
>
>  #include "qemu/osdep.h"
>  #if defined(CONFIG_POSIX)
> -#include <sys/mman.h>
>  #endif
>  #include "hw/hw.h"
>  #include "hw/qdev.h"

...and here.

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

      reply	other threads:[~2016-06-06 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 17:15 [Qemu-devel] [PATCH v2] os-posix: include sys/mman.h Paolo Bonzini
2016-06-06 17:53 ` Peter Maydell [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='CAFEAcA9R2eQBhifhTqhqCE2Skxs2mFHAdeWXtzsdz2=TOgJwkQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).