From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkIYJ-0005x5-8R for qemu-devel@nongnu.org; Thu, 08 Oct 2015 17:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkIYE-00074G-7K for qemu-devel@nongnu.org; Thu, 08 Oct 2015 17:16:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkIYE-00074C-1b for qemu-devel@nongnu.org; Thu, 08 Oct 2015 17:16:34 -0400 Date: Fri, 9 Oct 2015 00:16:28 +0300 From: "Michael S. Tsirkin" Message-ID: <1444338957-15293-2-git-send-email-mst@redhat.com> References: <1444338957-15293-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1444338957-15293-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 01/25] configure: probe for memfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Michael Tokarev , Gerd Hoffmann , Stefan Hajnoczi , =?us-ascii?B?PT9VVEYtOD9xP01hcmMtQW5kcj1DMz1BOT0yMEx1cmVhdT89?= , Paolo Bonzini From: Marc-Andr=E9 Lureau Check if memfd_create() is part of system libc. Signed-off-by: Marc-Andr=E9 Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 2d2a498..a68863c 100755 --- a/configure +++ b/configure @@ -3486,6 +3486,22 @@ if compile_prog "" "" ; then eventfd=3Dyes fi =20 +# check if memfd is supported +memfd=3Dno +cat > $TMPC << EOF +#include + +int main(void) +{ + return memfd_create("foo", MFD_ALLOW_SEALING); +} +EOF +if compile_prog "" "" ; then + memfd=3Dyes +fi + + + # check for fallocate fallocate=3Dno cat > $TMPC << EOF @@ -4857,6 +4873,9 @@ fi if test "$eventfd" =3D "yes" ; then echo "CONFIG_EVENTFD=3Dy" >> $config_host_mak fi +if test "$memfd" =3D "yes" ; then + echo "CONFIG_MEMFD=3Dy" >> $config_host_mak +fi if test "$fallocate" =3D "yes" ; then echo "CONFIG_FALLOCATE=3Dy" >> $config_host_mak fi --=20 MST