mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
crc32: use uint32_t rather than unsigned long
The envcrc.c does sizeof(unsigned long) when calculating the crc, but this is done with the build toolchain instead of the target tool chain, so if the build is a 64bit system but the target is 32bits, the size will obviously be wrong. This converts all unsigned long stuff related to crc32 to uint32_t types. Compile tested only: output of ./tools/envcrc when run on a 32bit build system matches that of a 64bit build system. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
parent
58c5376ba6
commit
89cdab788f
7 changed files with 32 additions and 21 deletions
|
@ -604,8 +604,8 @@ int sprintf(char * buf, const char *fmt, ...);
|
|||
int vsprintf(char *buf, const char *fmt, va_list args);
|
||||
|
||||
/* lib_generic/crc32.c */
|
||||
ulong crc32 (ulong, const unsigned char *, uint);
|
||||
ulong crc32_no_comp (ulong, const unsigned char *, uint);
|
||||
uint32_t crc32 (uint32_t, const unsigned char *, uint);
|
||||
uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint);
|
||||
|
||||
/* common/console.c */
|
||||
int console_init_f(void); /* Before relocation; uses the serial stuff */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue