From 89cdab788f3716b335fefb60b836ebcf975aceab Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 31 Mar 2008 11:02:01 -0400 Subject: 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 Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- tools/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/Makefile') diff --git a/tools/Makefile b/tools/Makefile index 8784a6d5c2..b89792327d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -236,7 +236,11 @@ $(obj)environment.c: $(obj)environment.o: $(obj)environment.c $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $< -$(obj)crc32.c: +$(obj)zlib.h: + @rm -f $@ + ln -s $(src)../include/zlib.h $@ + +$(obj)crc32.c: $(obj)zlib.h @rm -f $(obj)crc32.c ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c -- cgit v1.2.1