Received: from eggs.gnu.org ([2001:4830:134:3::10]:34757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqbm-0004Pn-Av for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoqbj-00067K-Js for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:27:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqbj-00067F-FG for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:26:59 -0400 Date: Wed, 21 Oct 2015 13:26:54 +0300 From: "Michael S. Tsirkin" Message-ID: <1445423133-5119-10-git-send-email-mst@redhat.com> References: <1445423133-5119-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: <1445423133-5119-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 09/38] configure: probe for memfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Thibaut Collet , 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 Tested-by: Thibaut Collet --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 9eec860..8d9b83c 100755 --- a/configure +++ b/configure @@ -3495,6 +3495,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 @@ -4889,6 +4905,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