]> git.pld-linux.org Git - packages/qemu.git/blame - qemu-glibc2_27.patch
upstream patch to fix build with glibc 2.27
[packages/qemu.git] / qemu-glibc2_27.patch
CommitLineData
584dfe42
JP
1From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 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=utf8
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>
19Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
20---
21 configure | 2 +-
22 util/memfd.c | 4 +---
23 2 files changed, 2 insertions(+), 4 deletions(-)
24
25diff --git a/configure b/configure
26index 9c8aa5a..99ccc17 100755
27--- a/configure
28+++ b/configure
29@@ -3923,7 +3923,7 @@ fi
30 # check if memfd is supported
31 memfd=no
32 cat > $TMPC << EOF
33-#include <sys/memfd.h>
34+#include <sys/mman.h>
35
36 int main(void)
37 {
38diff --git a/util/memfd.c b/util/memfd.c
39index 4571d1a..412e94a 100644
40--- a/util/memfd.c
41+++ b/util/memfd.c
42@@ -31,9 +31,7 @@
43
44 #include "qemu/memfd.h"
45
46-#ifdef CONFIG_MEMFD
47-#include <sys/memfd.h>
48-#elif defined CONFIG_LINUX
49+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
50 #include <sys/syscall.h>
51 #include <asm/unistd.h>
52
53--
541.8.3.1
55
This page took 0.092564 seconds and 4 git commands to generate.