1From 593407d2b3ea3b871d55ec399671e48c84b900a7 Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3Date: Thu, 21 Jan 2016 22:01:37 +0100 4Subject: [PATCH] Avoid RSA type redefinition 5 6The host_key.h headers does: 7 8 typedef struct rsa_st RSA; 9 10But this type definition is already done by the OpenSSL headers. 11 12While such a type redefinition is legal with recent gcc versions, it 13doesn't build with older gcc versions such as gcc 4.4. 14 15To work around this problem, we instead use a forward declaration of 16"struct rsa_st", and change the only place where the RSA type was used 17by "struct rsa_st". 18 19Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 20--- 21 host/lib/include/host_key.h | 4 ++-- 22 1 file changed, 2 insertions(+), 2 deletions(-) 23 24diff --git a/host/lib/include/host_key.h b/host/lib/include/host_key.h 25index 9f98ccc..c2d01a5 100644 26--- a/host/lib/include/host_key.h 27+++ b/host/lib/include/host_key.h 28@@ -12,11 +12,11 @@ 29 #include "vboot_struct.h" 30 31 32-typedef struct rsa_st RSA; 33+struct rsa_st; 34 35 /* Private key data */ 36 typedef struct VbPrivateKey { 37- RSA* rsa_private_key; /* Private key data */ 38+ struct rsa_rt* rsa_private_key; /* Private key data */ 39 uint64_t algorithm; /* Algorithm to use when signing */ 40 } VbPrivateKey; 41 42-- 432.6.4 44 45