From c72ea2a6c7ab25ac451164e6373a721c98cd9603 Mon Sep 17 00:00:00 2001 From: Alan Swanson Date: Fri, 1 Oct 2021 16:46:32 +0100 Subject: [PATCH] uboot-lantiq: fix sha1.h header clash when system libmd installed Backport of u-boot commit "includes: move openssl headers to include/u-boot" https://github.com/u-boot/u-boot/commit/2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167 Fixes: FS#3955 Signed-off-by: Alan Swanson (cherry picked from commit 8db641049292035604f0e1fb788608fdea879eca) --- .../patches/101-fix-crypt-header-clash.patch | 172 ++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 package/boot/uboot-lantiq/patches/101-fix-crypt-header-clash.patch diff --git a/package/boot/uboot-lantiq/patches/101-fix-crypt-header-clash.patch b/package/boot/uboot-lantiq/patches/101-fix-crypt-header-clash.patch new file mode 100644 index 0000000000..fcb1a3d95b --- /dev/null +++ b/package/boot/uboot-lantiq/patches/101-fix-crypt-header-clash.patch @@ -0,0 +1,172 @@ +Fix header clash with system /usr/include/sha1.h and sha256.h when libmd +is installed. + +Backport of u-boot commit "includes: move openssl headers to include/u-boot" +https://github.com/u-boot/u-boot/commit/2b9912e6a7df7b1f60beb7942bd0e6fa5f9d0167 + +--- a/board/gdsys/p1022/controlcenterd-id.c ++++ b/board/gdsys/p1022/controlcenterd-id.c +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- a/board/pcs440ep/pcs440ep.c ++++ b/board/pcs440ep/pcs440ep.c +@@ -13,7 +13,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- a/common/cmd_sha1sum.c ++++ b/common/cmd_sha1sum.c +@@ -11,7 +11,7 @@ + #include + #include + #include +-#include ++#include + + int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) + { +--- a/common/hash.c ++++ b/common/hash.c +@@ -14,8 +14,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + #include + +--- a/common/image-fit.c ++++ b/common/image-fit.c +@@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR; + #endif /* !USE_HOSTCC*/ + + #include +-#include ++#include + #include + #include + +--- a/common/image.c ++++ b/common/image.c +@@ -34,7 +34,7 @@ + #endif + + #include +-#include ++#include + #include + #include + +--- a/drivers/crypto/ace_sha.c ++++ b/drivers/crypto/ace_sha.c +@@ -5,8 +5,8 @@ + * SPDX-License-Identifier: GPL-2.0+ + */ + #include +-#include +-#include ++#include ++#include + #include + #include "ace_sha.h" + +--- /dev/null ++++ b/include/u-boot/sha1.h +@@ -0,0 +1 @@ ++#include "../sha1.h" +--- /dev/null ++++ b/include/u-boot/sha256.h +@@ -0,0 +1 @@ ++#include "../sha256.h" +--- a/lib/rsa/rsa-verify.c ++++ b/lib/rsa/rsa-verify.c +@@ -7,7 +7,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- a/lib/sha1.c ++++ b/lib/sha1.c +@@ -36,7 +36,7 @@ + #include + #endif /* USE_HOSTCC */ + #include +-#include "sha1.h" ++#include + + /* + * 32-bit integer manipulation macros (big endian) +--- a/lib/sha256.c ++++ b/lib/sha256.c +@@ -11,7 +11,7 @@ + #endif /* USE_HOSTCC */ + #include + #include +-#include ++#include + + /* + * 32-bit integer manipulation macros (big endian) +--- a/lib/tpm.c ++++ b/lib/tpm.c +@@ -7,7 +7,7 @@ + + #include + #include +-#include ++#include + #include + #include + +--- a/tools/imls/imls.c ++++ b/tools/imls/imls.c +@@ -24,7 +24,7 @@ + #include + #endif + +-#include ++#include + #include + #include + #include +--- a/tools/mkimage.h ++++ b/tools/mkimage.h +@@ -18,7 +18,7 @@ + #include + #include + #include +-#include ++#include + #include "fdt_host.h" + + #undef MKIMAGE_DEBUG +--- a/tools/ubsha1.c ++++ b/tools/ubsha1.c +@@ -13,7 +13,7 @@ + #include + #include + #include +-#include "sha1.h" ++#include + + int main (int argc, char **argv) + { -- 2.30.2