aboutsummaryrefslogtreecommitdiff
From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Tue, 28 Nov 2017 11:51:27 +0100
Subject: [PATCH] memfd: fix configure test
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Recent glibc added memfd_create in sys/mman.h.  This conflicts with
the definition in util/memfd.c:

    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration

Fix the configure test, and remove the sys/memfd.h inclusion since the
file actually does not exist---it is a typo in the memfd_create(2) man
page.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure    | 2 +-
 util/memfd.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 9c8aa5a..99ccc17 100755
--- a/configure
+++ b/configure
@@ -3923,7 +3923,7 @@ fi
 # check if memfd is supported
 memfd=no
 cat > $TMPC << EOF
-#include <sys/memfd.h>
+#include <sys/mman.h>
 
 int main(void)
 {
diff --git a/util/memfd.c b/util/memfd.c
index 4571d1a..412e94a 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -31,9 +31,7 @@
 
 #include "qemu/memfd.h"
 
-#ifdef CONFIG_MEMFD
-#include <sys/memfd.h>
-#elif defined CONFIG_LINUX
+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
 #include <sys/syscall.h>
 #include <asm/unistd.h>
 
-- 
1.8.3.1

hner 2023-02-25gnu: virglrenderer: Update to 0.10.4....* gnu/packages/spice.scm (virglrenderer): Update to 0.10.4. [source]: Use git-fetch and update URI. [build-system] Change to meson-build-system. [inputs]: Remove eudev. [native-inputs]: Add python. [home-page]: Update URL. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Simon Streit 2023-02-25gnu: spice-gtk: Adjust the default file name of the ACL helper binary....* gnu/packages/spice.scm (spice-gtk) [arguments]: Add adjust-default-acl-helper-path phase. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-gtk: Enable support for polkit, webdav and others....* gnu/packages/spice.scm (spice-gtk) [arguments]: Add the correct-polkit-dir and fake-pkexec phases. [inputs]: Add acl, cyrus-sasl, libcap-ng, polkit and usbutils. [propagated-inputs]: Add libcacard and phodav. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-vdagent: Update to 0.22.1....* gnu/packages/spice.scm (spice-vdagent): Update to 0.22.1. [source]: Delete patch. * gnu/packages/patches/spice-vdagent-glib-2.68.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice: Update to 0.15.1....* gnu/packages/spice.scm (spice): Update to 0.15.1. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: libcacard: Remove obsolete configure flags....* gnu/packages/spice.scm (libcacard) [arguments]: Delete field. [propagated-inputs]: Reword comment. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: virglrenderer: Update to 0.7.0....* gnu/packages/spice.scm (virglrenderer): Update to 0.7.0. Remove patch. Re-indent and sort inputs. * gnu/packages/patches/virglrenderer-CVE-2017-6386.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: usbredir: Update to 0.13.0....* gnu/packages/spice.scm (usbredir): Update to 0.13.0. [inputs]: Add glib. [native-inputs]: Remove autoconf, automake, and libtool. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-protocol: Update to 0.14.4....* gnu/packages/spice.scm (spice-protocol): Update to 0.14.4. [arguments]: Use gexps. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-gtk: Propagate libjpeg-turbo, lz4, opus, and usbredir....* gnu/packages/spice.scm (spice-gtk) [inputs]: Move libjpeg-turbo, lz4, opus, and usbredir to... [propagated-inputs]: ... here. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-gtk: Update to 0.42....* gnu/packages/spice.scm (spice-gtk): Update to 0.42. [build-system]: Use meson-build-system. [arguments]: Remove configure-flags. Rename disable-session-test phase to disable-problematic-tests, and adjust. Remove the patch-la-files phase. [native-inputs]: Add python, python-pyparsing and python-six. [inputs]: Remove python. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-gtk: Use gexps....* gnu/packages/spice.scm (spice-gtk) [arguments]: Streamline and use gexps. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-gtk: Remove input labels....* gnu/packages/spice.scm (spice-gtk): Remove input labels. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2023-02-25gnu: spice-gtk: Fix indentation and normalize field order....* gnu/packages/spice.scm (spice-gtk): Fix indentation. Move and re-order inputs below arguments. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer