On 6 June 2016 at 18:15, Paolo Bonzini <pbonz...@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 <pbonz...@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.mayd...@linaro.org> thanks -- PMM