diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch new file mode 100644 index 0000000000..4691a3672a --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/0001-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 444e80e63d35006f41e7d658e2bf6d7c9f7641df Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 21 Mar 2022 10:09:38 -0700 | ||
4 | Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux | ||
5 | systems | ||
6 | |||
7 | linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures | ||
8 | which include asm-generic/mman.h and mips/powerpc are not including this | ||
9 | file in linux/mman.h, therefore these should be defined for such | ||
10 | architectures on Linux as well. This fixes build on mips/musl/linux | ||
11 | |||
12 | Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg05298.html] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Cc: Zhang Yi <yi.z.zhang@linux.intel.com> | ||
15 | Cc: Michael S. Tsirkin <mst@redhat.com> | ||
16 | --- | ||
17 | util/mmap-alloc.c | 10 +++++++--- | ||
18 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c | ||
21 | index 893d864354..86d3cda248 100644 | ||
22 | --- a/util/mmap-alloc.c | ||
23 | +++ b/util/mmap-alloc.c | ||
24 | @@ -10,14 +10,18 @@ | ||
25 | * later. See the COPYING file in the top-level directory. | ||
26 | */ | ||
27 | |||
28 | +#include "qemu/osdep.h" | ||
29 | #ifdef CONFIG_LINUX | ||
30 | #include <linux/mman.h> | ||
31 | -#else /* !CONFIG_LINUX */ | ||
32 | +#endif /* CONFIG_LINUX */ | ||
33 | + | ||
34 | +#ifndef MAP_SYNC | ||
35 | #define MAP_SYNC 0x0 | ||
36 | +#endif /* MAP_SYNC */ | ||
37 | +#ifndef MAP_SHARED_VALIDATE | ||
38 | #define MAP_SHARED_VALIDATE 0x0 | ||
39 | -#endif /* CONFIG_LINUX */ | ||
40 | +#endif /* MAP_SHARED_VALIDATE */ | ||
41 | |||
42 | -#include "qemu/osdep.h" | ||
43 | #include "qemu/mmap-alloc.h" | ||
44 | #include "qemu/host-utils.h" | ||
45 | #include "qemu/cutils.h" | ||
46 | -- | ||
47 | 2.35.1 | ||
48 | |||