X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=lib%2Fsha256.c;h=bb338baefa836a6a73d5872c9f7412536b0a25f2;hb=237ef6e528310bfffcf1d499f90c40f27e3582cf;hp=7348162575ceaccda1fa0100298e47e2f0e25af9;hpb=778c3cbd857f4abe54773f399204dd86ffe6516c;p=karo-tx-uboot.git diff --git a/lib/sha256.c b/lib/sha256.c index 7348162575..bb338baefa 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,10 +8,12 @@ #ifndef USE_HOSTCC #include +#include +#else +#include #endif /* USE_HOSTCC */ #include -#include -#include +#include /* * 32-bit integer manipulation macros (big endian) @@ -258,14 +260,15 @@ void sha256_csum_wd(const unsigned char *input, unsigned int ilen, { sha256_context ctx; #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - unsigned char *end, *curr; + const unsigned char *end; + unsigned char *curr; int chunk; #endif sha256_starts(&ctx); #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - curr = input; + curr = (unsigned char *)input; end = input + ilen; while (curr < end) { chunk = end - curr;