[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems
From: |
Khem Raj |
Subject: |
[PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems |
Date: |
Mon, 21 Mar 2022 10:16:22 -0700 |
linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures
which include asm-generic/mman.h and mips/powerpc are not including this
file in linux/mman.h, therefore these should be defined for such
architectures on Linux as well. This fixes build on mips/musl/linux
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
util/mmap-alloc.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
index 893d864354..86d3cda248 100644
--- a/util/mmap-alloc.c
+++ b/util/mmap-alloc.c
@@ -10,14 +10,18 @@
* later. See the COPYING file in the top-level directory.
*/
+#include "qemu/osdep.h"
#ifdef CONFIG_LINUX
#include <linux/mman.h>
-#else /* !CONFIG_LINUX */
+#endif /* CONFIG_LINUX */
+
+#ifndef MAP_SYNC
#define MAP_SYNC 0x0
+#endif /* MAP_SYNC */
+#ifndef MAP_SHARED_VALIDATE
#define MAP_SHARED_VALIDATE 0x0
-#endif /* CONFIG_LINUX */
+#endif /* MAP_SHARED_VALIDATE */
-#include "qemu/osdep.h"
#include "qemu/mmap-alloc.h"
#include "qemu/host-utils.h"
#include "qemu/cutils.h"
--
2.35.1
- [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux systems,
Khem Raj <=