From patchwork Thu Jan 21 21:10:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 571347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 32BA71402F0 for ; Fri, 22 Jan 2016 08:10:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F1B9E8C231; Thu, 21 Jan 2016 21:10: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 wKQ7FjwO1fNk; Thu, 21 Jan 2016 21:10:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C03088C1B7; Thu, 21 Jan 2016 21:10:23 +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 5E52E1C1170 for ; Thu, 21 Jan 2016 21:10:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 27E5F8C1B7 for ; Thu, 21 Jan 2016 21:10:22 +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 Qvppc9iV+1Il for ; Thu, 21 Jan 2016 21:10:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by whitealder.osuosl.org (Postfix) with ESMTP id 0B6C48C1A6 for ; Thu, 21 Jan 2016 21:10:21 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id D0A682BC; Thu, 21 Jan 2016 22:10:20 +0100 (CET) Received: from localhost (AToulouse-657-1-972-253.w109-223.abo.wanadoo.fr [109.223.54.253]) by mail.free-electrons.com (Postfix) with ESMTPSA id 94C1E1F5; Thu, 21 Jan 2016 22:10:20 +0100 (CET) From: Thomas Petazzoni To: Buildroot List Date: Thu, 21 Jan 2016 22:10:10 +0100 Message-Id: <1453410610-12040-2-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1453410610-12040-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1453410610-12040-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 2/2] vboot-utils: fix RSA redefinition build error with old compilers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Old gcc compilers do not support type redefinitions, which causes a build failure of the host-vboot-utils package on certain machines. The vboot-utils source code redefines "typedef struct rsa_st RSA" which is already defined in the OpenSSL headers. This commit adds a patch which works around this build issue. Fixes: http://autobuild.buildroot.org/results/1a4/1a45412939a3f9d6fa59d086d834a3b4a4bffef7/ Signed-off-by: Thomas Petazzoni --- .../0003-Avoid-RSA-type-redefinition.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch diff --git a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch new file mode 100644 index 0000000..86374ca --- /dev/null +++ b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch @@ -0,0 +1,44 @@ +From 593407d2b3ea3b871d55ec399671e48c84b900a7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 21 Jan 2016 22:01:37 +0100 +Subject: [PATCH] Avoid RSA type redefinition + +The host_key.h headers does: + + typedef struct rsa_st RSA; + +But this type definition is already done by the OpenSSL headers. + +While such a type redefinition is legal with recent gcc versions, it +doesn't build with older gcc versions such as gcc 4.4. + +To work around this problem, we instead use a forward declaration of +"struct rsa_st", and change the only place where the RSA type was used +by "struct rsa_st". + +Signed-off-by: Thomas Petazzoni +--- + host/lib/include/host_key.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/host/lib/include/host_key.h b/host/lib/include/host_key.h +index 9f98ccc..c2d01a5 100644 +--- a/host/lib/include/host_key.h ++++ b/host/lib/include/host_key.h +@@ -12,11 +12,11 @@ + #include "vboot_struct.h" + + +-typedef struct rsa_st RSA; ++struct rsa_st; + + /* Private key data */ + typedef struct VbPrivateKey { +- RSA* rsa_private_key; /* Private key data */ ++ struct rsa_rt* rsa_private_key; /* Private key data */ + uint64_t algorithm; /* Algorithm to use when signing */ + } VbPrivateKey; + +-- +2.6.4 +