aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-06-06 13:57:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-06-16 18:39:03 +0200
commit02d0e095031b7fda77de8b558465a57659ea79cb (patch)
tree78ce56328efb58eec9c99584b71229bae47d3030 /include
parent89266923df71e51f406184d3e8b55d2a3aaa4c4d (diff)
os-posix: include sys/mman.h
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. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/osdep.h2
-rw-r--r--include/sysemu/os-posix.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 693769403f..e63da2831a 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -197,8 +197,6 @@ void qemu_anon_ram_free(void *ptr, size_t size);
#if defined(CONFIG_MADVISE)
-#include <sys/mman.h>
-
#define QEMU_MADV_WILLNEED MADV_WILLNEED
#define QEMU_MADV_DONTNEED MADV_DONTNEED
#ifdef MADV_DONTFORK
diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index 07e3e5ae9b..9c7dfdfbec 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -26,6 +26,7 @@
#ifndef QEMU_OS_POSIX_H
#define QEMU_OS_POSIX_H
+#include <sys/mman.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>