packages/utils/qemu/patches/0006-util-mmap-alloc-fix-missing-MAP_SYNC.patch
Yousong Zhou f40420d456 qemu: bump to version 5.0.0
The slirp patch was included in this QEMU release

CXX_DEPENDS is now added for all host components otherwise we get
errors like the following

  Package qemu-img is missing dependencies for the following libraries:
  libuClibc++.so.0
  Package qemu-nbd is missing dependencies for the following libraries:
  libuClibc++.so.0

--disable-bluez was removed from configure args because upstream
deprecated bluetooth subsystem since qemu v3.1 and remove the code in
commit 1d4ffe8dc77c ("Remove the core bluetooth code")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-05-11 17:02:16 +08:00

50 lines
1.4 KiB
Diff

From e1e0a76305927290d75b4aae56f1ed89d83da741 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Mon, 30 Mar 2020 12:48:58 +0800
Subject: [PATCH] util/mmap-alloc: fix missing MAP_SYNC
Quote musl-libc commit 9b57db3f958 ("add MAP_SYNC and
MAP_SHARED_VALIDATE from linux v4.15")
> for synchronous page faults, new in linux commit
> 1c9725974074a047f6080eecc62c50a8e840d050 and
> b6fb293f2497a9841d94f6b57bd2bb2cd222da43
> note that only targets that use asm-generic/mman.h have this new
> flag defined, so undef it on other targets (mips*, powerpc*).
Fixes 119906afa5c ("util/mmap-alloc: support MAP_SYNC in
qemu_ram_mmap()")
Signed-off-by: Yousong Zhou <yszhou4tech@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 27dcccd8ec..e133e38d21 100644
--- a/util/mmap-alloc.c
+++ b/util/mmap-alloc.c
@@ -12,9 +12,6 @@
#ifdef CONFIG_LINUX
#include <linux/mman.h>
-#else /* !CONFIG_LINUX */
-#define MAP_SYNC 0x0
-#define MAP_SHARED_VALIDATE 0x0
#endif /* CONFIG_LINUX */
#include "qemu/osdep.h"
@@ -27,6 +24,13 @@
#include <sys/vfs.h>
#endif
+#ifndef MAP_SYNC
+#define MAP_SYNC 0x0
+#endif
+#ifndef MAP_SHARED_VALIDATE
+#define MAP_SHARED_VALIDATE 0x0
+#endif
+
size_t qemu_fd_getpagesize(int fd)
{
#ifdef CONFIG_LINUX