From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK8o8-0004cH-DH for qemu-devel@nongnu.org; Tue, 28 Jul 2015 13:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK8o7-0000vb-I5 for qemu-devel@nongnu.org; Tue, 28 Jul 2015 13:36:52 -0400 Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:34447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK8o7-0000vU-ES for qemu-devel@nongnu.org; Tue, 28 Jul 2015 13:36:51 -0400 Received: by qkfc129 with SMTP id c129so54083184qkf.1 for ; Tue, 28 Jul 2015 10:36:51 -0700 (PDT) Sender: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 28 Jul 2015 19:36:35 +0200 Message-Id: <1438105003-29501-2-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1438105003-29501-1-git-send-email-marcandre.lureau@redhat.com> References: <1438105003-29501-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v2 1/9] configure: probe for memfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: haifeng.lin@huawei.com, mst@redhat.com, thibaut.collet@6wind.com, jasowang@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 704b34c..c754700 100755 --- a/configure +++ b/configure @@ -3406,6 +3406,22 @@ if compile_prog "" "" ; then eventfd=yes fi +# check if memfd is supported +memfd=no +cat > $TMPC << EOF +#include + +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 @@ -4786,6 +4802,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