uint8_t used in sha1_der_prefix array was not able to recognize by compiler when try to build the tools using 'HOSTCC'. That is because, uint8_t is undefined when 'HOSTCC' is defined because asm/type.h is not included in that case. Use unsigned char for sha1_der_prefix[] array instead.
This commit is to remove and change the uint8_t to unsigned char for sha1_der_perfix[] array. Signed-off-by: Wilson Lee <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Keng Soon Cheah <[email protected]> Cc: Chen Yee Chew <[email protected]> Cc: Andrew Duda <[email protected]> Cc: Simon Glass <[email protected]> --- include/u-boot/sha1.h | 2 +- lib/sha1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/u-boot/sha1.h b/include/u-boot/sha1.h index 2634a29..b5e55fe 100644 --- a/include/u-boot/sha1.h +++ b/include/u-boot/sha1.h @@ -23,7 +23,7 @@ extern "C" { #define SHA1_SUM_LEN 20 #define SHA1_DER_LEN 15 -extern const uint8_t sha1_der_prefix[]; +extern const unsigned char sha1_der_prefix[]; /** * \brief SHA-1 context structure diff --git a/lib/sha1.c b/lib/sha1.c index f54bb5b..d5d58c4 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -26,7 +26,7 @@ #include <watchdog.h> #include <u-boot/sha1.h> -const uint8_t sha1_der_prefix[SHA1_DER_LEN] = { +const unsigned char sha1_der_prefix[SHA1_DER_LEN] = { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 }; -- 2.7.4 _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

