Without it, we never have CONFIG_LINUX defined even if on linux, so
linux/mman.h is never really included.

Signed-off-by: Peter Xu <pet...@redhat.com>
---
 util/mmap-alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
index 5ed7d29183..040599b0e3 100644
--- a/util/mmap-alloc.c
+++ b/util/mmap-alloc.c
@@ -9,6 +9,7 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or
  * later.  See the COPYING file in the top-level directory.
  */
+#include "qemu/osdep.h"
 
 #ifdef CONFIG_LINUX
 #include <linux/mman.h>
@@ -17,7 +18,6 @@
 #define MAP_SHARED_VALIDATE   0x0
 #endif /* CONFIG_LINUX */
 
-#include "qemu/osdep.h"
 #include "qemu/mmap-alloc.h"
 #include "qemu/host-utils.h"
 #include "qemu/cutils.h"
-- 
2.37.3


Reply via email to