X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=lib%2Fcrc32.c;h=97592124867abb815d576899f8789545c3aef1aa;hb=1094689860c2024837a646b6e8357689a0dfe41d;hp=76205da4f3060028508d4f39974b673ea52c898a;hpb=76b40ab41eff1f402ee52ba768b09daad293b9bb;p=karo-tx-uboot.git diff --git a/lib/crc32.c b/lib/crc32.c index 76205da4f3..9759212486 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -8,7 +8,9 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#ifndef USE_HOSTCC +#ifdef USE_HOSTCC +#include +#else #include #endif #include @@ -256,5 +258,6 @@ void crc32_wd_buf(const unsigned char *input, unsigned int ilen, uint32_t crc; crc = crc32_wd(0, input, ilen, chunk_sz); + crc = htonl(crc); memcpy(output, &crc, sizeof(crc)); }