[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 02/21] configure: probe for memfd
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v5 02/21] configure: probe for memfd |
Date: |
Thu, 24 Sep 2015 18:22:02 +0200 |
From: Marc-André Lureau <address@hidden>
Check if memfd_create() is part of system libc.
Signed-off-by: Marc-André Lureau <address@hidden>
---
configure | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/configure b/configure
index 52f5b79..a7cdfa4 100755
--- a/configure
+++ b/configure
@@ -3455,6 +3455,22 @@ if compile_prog "" "" ; then
eventfd=yes
fi
+# check if memfd is supported
+memfd=no
+cat > $TMPC << EOF
+#include <sys/memfd.h>
+
+int main(void)
+{
+ return memfd_create("foo", MFD_ALLOW_SEALING);
+}
+EOF
+if compile_prog "" "" ; then
+ memfd=yes
+fi
+
+
+
# check for fallocate
fallocate=no
cat > $TMPC << EOF
@@ -4840,6 +4856,9 @@ fi
if test "$eventfd" = "yes" ; then
echo "CONFIG_EVENTFD=y" >> $config_host_mak
fi
+if test "$memfd" = "yes" ; then
+ echo "CONFIG_MEMFD=y" >> $config_host_mak
+fi
if test "$fallocate" = "yes" ; then
echo "CONFIG_FALLOCATE=y" >> $config_host_mak
fi
--
2.4.3
- [Qemu-devel] [PATCH v5 00/21] vhost-user: add migration support, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 01/21] vhost-user: unit test for new messages, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 02/21] configure: probe for memfd,
marcandre . lureau <=
- [Qemu-devel] [PATCH v5 03/21] util: add linux-only memfd fallback, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 04/21] util: add memfd helpers, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 05/21] vhost: alloc shareable log, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 06/21] vhost: document log resizing, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 07/21] vhost: add vhost_set_log_base op, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 09/21] vhost-user: add a migration blocker, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 08/21] vhost-user: send log shm fd along with log_base, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 11/21] vhost: only use shared log if in use by backend, marcandre . lureau, 2015/09/24
- [Qemu-devel] [PATCH v5 12/21] vhost-user: document migration log, marcandre . lureau, 2015/09/24