summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2018-06-01 10:29:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-04 15:15:00 +0100
commitdfc9dd521bedc0ab2591c22d699be5cc6e159e57 (patch)
treec499c2e87c59ef6e3b5a55e9e0a8b1babb8a0d24 /meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch
parentf1eb044403b543e1122656d89280ea5202783a78 (diff)
downloadpoky-dfc9dd521bedc0ab2591c22d699be5cc6e159e57.tar.gz
qemu: refresh patches with devtool and make them applicable with git
(From OE-Core rev: e8fb42f3a54e8b8d68ae216a48534fa745ea99f1) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch b/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch
new file mode 100644
index 0000000000..880cb980a0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch
@@ -0,0 +1,54 @@
1From 0c8af3f651a125d636a71d93bafd35ff5240431a Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Tue, 28 Nov 2017 11:51:27 +0100
4Subject: [PATCH] memfd: fix configure test
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Recent glibc added memfd_create in sys/mman.h. This conflicts with
10the definition in util/memfd.c:
11
12 /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
13
14Fix the configure test, and remove the sys/memfd.h inclusion since the
15file actually does not exist---it is a typo in the memfd_create(2) man
16page.
17
18Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
19Upstream-Status: Backport
20Signed-off-by: Ross Burton <ross.burton@intel.com>
21Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22---
23 configure | 2 +-
24 util/memfd.c | 4 +---
25 2 files changed, 2 insertions(+), 4 deletions(-)
26
27diff --git a/configure b/configure
28index b5312f4..ec12f36 100755
29--- a/configure
30+++ b/configure
31@@ -3920,7 +3920,7 @@ fi
32 # check if memfd is supported
33 memfd=no
34 cat > $TMPC << EOF
35-#include <sys/memfd.h>
36+#include <sys/mman.h>
37
38 int main(void)
39 {
40diff --git a/util/memfd.c b/util/memfd.c
41index 4571d1a..412e94a 100644
42--- a/util/memfd.c
43+++ b/util/memfd.c
44@@ -31,9 +31,7 @@
45
46 #include "qemu/memfd.h"
47
48-#ifdef CONFIG_MEMFD
49-#include <sys/memfd.h>
50-#elif defined CONFIG_LINUX
51+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
52 #include <sys/syscall.h>
53 #include <asm/unistd.h>
54