[U-Boot] [PATCH] lib: sha1: Change uint8_t to unsigned char for sha1_der_prefix array.
Wilson Lee
wilson.lee at ni.com
Wed Nov 8 02:30:31 UTC 2017
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 <wilson.lee at ni.com>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Keng Soon Cheah <keng.soon.cheah at ni.com>
Cc: Chen Yee Chew <chen.yee.chew at ni.com>
Cc: Andrew Duda <aduda at meraki.com>
Cc: Simon Glass <sjg at chromium.org>
---
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
More information about the U-Boot
mailing list