qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] os-posix: include sys/mman.h


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] os-posix: include sys/mman.h
Date: Mon, 6 Jun 2016 18:53:56 +0100

On 6 June 2016 at 18:15, Paolo Bonzini <address@hidden> 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 <address@hidden>

> 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 <address@hidden>

thanks
-- PMM



reply via email to

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