From nobody Mon Feb 9 23:01:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529376171479806.2936592484311; Mon, 18 Jun 2018 19:42:51 -0700 (PDT) Received: from localhost ([::1]:38716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6bX-0003uN-JC for importer@patchew.org; Mon, 18 Jun 2018 22:42:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5iY-0002Aw-E9 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5iX-0000CZ-J7 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:45:58 -0400 Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:34780) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5iX-0000CO-E4; Mon, 18 Jun 2018 21:45:57 -0400 Received: by mail-oi0-x231.google.com with SMTP id i205-v6so16712402oib.1; Mon, 18 Jun 2018 18:45:57 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id 97-v6sm7800810oth.15.2018.06.18.18.45.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PvBPJxOdkKrJhmmVj5S5R7vK9KAnKhVKbrbt4jZYNoY=; b=hD9tfqPj1JLeGgbHbqapi+ggnIezA+1s0nO55Y/1vTz9CF+X5rmufJJ6qKU++s2FiE r5wfO8Qo0usXw7tX/d1zUrpkkTN6/E3M71/LmO/Pla6rHMD/9MesjIl+Iv9osX5071tC S2+pxFCdmrOaolwp+3B2026vua2nnGHeMALHZb34JnhJ9wImUBfKENXfeStGtbf0Lp5I aW9aBzSa6B9O8isvtWEYVfYBiXPuJ/nKxFJ3P65jjUtwNY0W5xcsC8jRQXRMBKDKL1K5 CGA/r8M8NTdf8ltS3L6wqfKkFM8svlUeSOjhx1IvHHuDLwqAz0oBypCUdBSPm6uuHjaA k5jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=PvBPJxOdkKrJhmmVj5S5R7vK9KAnKhVKbrbt4jZYNoY=; b=tr8HKqjZy0rmVIR0iesDwf2nXbzgookx/WiZAD407xRJ6AfokM3sotnHA3/UhDY/iD z0BmWwzvtvzOb+vKgh03mlJ2AyRKZeC+34aRqDMo2fIpJvMs4LaqJIND7jL23nSZLQG5 B3vCBTq9UtiF2nIA3enTVkyi2NVuIe0bvNbYYu7A/tGZzjjDU8qEYYFRGH/ZLydUnuRv tK5O++PYRn4MSNeuYbnSTEcR6kkUDw5N//1P26QlapYBYowaBPVkMUzVQ9TtVEUB0YnV QPGmAQaX1SKRwRZuZbzh9wajQewU4FCdSA7obRFqk8+Gy4R2YWTskZ/WYK6eE7pdVe92 Ko8Q== X-Gm-Message-State: APt69E259DVnBoQ0L5ByIlYkR8Wfxcmrp8R+w0QSaKxErHUTS5hJ8e9K Loq8jQNh1t8NU+uFubwxabgltVcK X-Google-Smtp-Source: ADUXVKIMjFGyXyNcCNjyNzDfNCJRos8Hf2bXN7NgstXNoFi2SH1UFujfOBkBLaYqDTpA7hDyYQM2aw== X-Received: by 2002:aca:f594:: with SMTP id t142-v6mr8777949oih.56.1529372756211; Mon, 18 Jun 2018 18:45:56 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:41:30 -0500 Message-Id: <20180619014319.28272-5-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::231 Subject: [Qemu-devel] [PATCH 004/113] memfd: fix configure test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Greg Kurz , qemu-stable@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Paolo Bonzini 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=C3=A9 Lureau Signed-off-by: Paolo Bonzini (cherry picked from commit 75e5b70e6b5dcc4f2219992d7cffa462aa406af0) Signed-off-by: Greg Kurz --- configure | 2 +- util/memfd.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 0c6e7572db..087a82ac50 100755 --- a/configure +++ b/configure @@ -3920,7 +3920,7 @@ fi # check if memfd is supported memfd=3Dno cat > $TMPC << EOF -#include +#include =20 int main(void) { diff --git a/util/memfd.c b/util/memfd.c index 4571d1aba8..412e94a405 100644 --- a/util/memfd.c +++ b/util/memfd.c @@ -31,9 +31,7 @@ =20 #include "qemu/memfd.h" =20 -#ifdef CONFIG_MEMFD -#include -#elif defined CONFIG_LINUX +#if defined CONFIG_LINUX && !defined CONFIG_MEMFD #include #include =20 --=20 2.11.0