From patchwork Sun Apr 8 18:25:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 896059 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eZ8xrbSI"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40K2161WFrz9s31 for ; Mon, 9 Apr 2018 04:25:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C5DCF877A4; Sun, 8 Apr 2018 18:25:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tEi9Fedcn9GT; Sun, 8 Apr 2018 18:25:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7971C87778; Sun, 8 Apr 2018 18:25:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AE5EF1CF115 for ; Sun, 8 Apr 2018 18:25:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AB1CF87778 for ; Sun, 8 Apr 2018 18:25:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wx2mV6H1yBMj for ; Sun, 8 Apr 2018 18:25:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8016D87765 for ; Sun, 8 Apr 2018 18:25:23 +0000 (UTC) Received: by mail-qk0-f193.google.com with SMTP id c188so6883451qkg.2 for ; Sun, 08 Apr 2018 11:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6yRzAJ1KSLwbeK3y1MoByzksBg6Uj6nA4d5RN8CEWac=; b=eZ8xrbSI3RElbjLPRkO4Fq6moT7aev5cYdNQGA1pSYcz3cpsz7/h1yXbLis6qTpMw7 e1aRgqxQUzdun3jRvUZTna2g8KuHxjoD9RBNA06t3BzHE4De/SoSiTaQuI0FSOuD6qRW fKy0fWsXFpaQnktzVQaQhgX43JxVCa0wMDaQTkQaCYjJY8CIiAfNlqfJuU+t8d86weU3 2HK7ZjANnTnSIxnUlbdiG2cHfysWrbobHMIxkjC+RiRNPUWx3kfg2QgYCzZU/WaY0RrL wL7DOw/pCQfgCfPll6ERfqK9OkDBmUY218NR608zMvzWFJ1SNnML2Mumd/ZDFHlgkQZ1 iXRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6yRzAJ1KSLwbeK3y1MoByzksBg6Uj6nA4d5RN8CEWac=; b=iQHa0ql99Lu+iJifIj2Nl2SfKzJfuJ2HRf0l8dU0lzMjjz02NmE4OCvqR/S1vaKkmE Z4Iqx6E2rq1TfwlEaEj3x/Xle71rkHCwmLLurNK7VZ+B/t7mT8p1BBZKuDcovkAfar3S vOEO0QVx5Jn77ZVm2xVNrDRrqVf3jqQnf753n6mgc9WWSiopYPor9VQ7QD5vAalVrF7C hMvL4t6Ma9dQLPeL3OgpvZOgsbP6Ogf2OdoAGEXlNNaGyMKuT/e12yKMfVo19papEbQg sF6SE9SXMGUet7LGe+BLfnHXekpvkzSXffAx1JAG2d76RmRQkZ1oWUaCZ1cXfoj0aE58 5X+Q== X-Gm-Message-State: ALQs6tCHAXKIw+8O7CfyBjXIhFDLPRJANVgel64cFbqiHoAZCYEJcikY ZXo7D6dyzNCIO2elpt0+iFDpU5Ng X-Google-Smtp-Source: AIpwx4/V0p/mrAryEh+hMXNysgw/3jL80YjAtR/1w1nHDHuEBQUc83fc1QQpdeqyHV5DkotjvBwmPA== X-Received: by 10.55.7.18 with SMTP id 18mr46744995qkh.249.1523211922169; Sun, 08 Apr 2018 11:25:22 -0700 (PDT) Received: from Alistairs-ThinkPadX1Yoga.localdomain ([2601:646:8000:5f87:112:f974:240e:8a6d]) by smtp.gmail.com with ESMTPSA id i82sm11002969qke.44.2018.04.08.11.25.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Apr 2018 11:25:20 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: buildroot@busybox.net Date: Sun, 8 Apr 2018 11:25:15 -0700 Message-Id: <1523211915-680-1-git-send-email-alistair@alistair23.me> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/xen: Fix qemu-xen memfd build failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, Alistair Francis Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix the QEMU memfd compile error: tools/qemu-xen/util/memfd.c:40:12: error: static declaration of 'memfd_create' follows non-static declaration static int memfd_create(const char *name, unsigned int flags) ^~~~~~~~~~~~ that has been introduced since the Glibc 2.27 upgrade. This just involves porting the upstream QEMU patch to the Xen QEMU tree. This fixes: http://autobuild.buildroot.net/results/ec7cda00e07b0c98a9a366244b67611e042e0d4b/ Signed-off-by: Alistair Francis Tested-by: Matt Weber --- package/xen/0003-memfd-fix-configure-test.patch | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 package/xen/0003-memfd-fix-configure-test.patch diff --git a/package/xen/0003-memfd-fix-configure-test.patch b/package/xen/0003-memfd-fix-configure-test.patch new file mode 100644 index 0000000..95cb49b --- /dev/null +++ b/package/xen/0003-memfd-fix-configure-test.patch @@ -0,0 +1,62 @@ +From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 28 Nov 2017 11:51:27 +0100 +Subject: [PATCH] memfd: fix configure test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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é Lureau +Signed-off-by: Paolo Bonzini +Signed-off-by: Baruch Siach +[ Changes by AF: + - Port the patch to the qemu-xen tree +] +Signed-off-by: Alistair Francis +--- +Upstream status: commit 75e5b70e6b5 + + configure | 2 +- + util/memfd.c | 4 +--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 9c8aa5a98bd4..99ccc1725ace 100755 +--- a/tools/qemu-xen/configure ++++ b/tools/qemu-xen/configure +@@ -3923,7 +3923,7 @@ fi + # check if memfd is supported + memfd=no + cat > $TMPC << EOF +-#include ++#include + + int main(void) + { +diff --git a/util/memfd.c b/util/memfd.c +index 4571d1aba866..412e94a405fc 100644 +--- a/tools/qemu-xen/util/memfd.c ++++ b/tools/qemu-xen/util/memfd.c +@@ -31,9 +31,7 @@ + + #include "qemu/memfd.h" + +-#ifdef CONFIG_MEMFD +-#include +-#elif defined CONFIG_LINUX ++#if defined CONFIG_LINUX && !defined CONFIG_MEMFD + #include + #include + +-- +2.16.2 +