
[Adding u-boot-users to Cc]
On Mon, 20 Aug 2007 19:00:01 +0300 Semih Hazar semih.hazar@indefia.com wrote:
Signed-off-by: Semih Hazar semih.hazar@indefia.com
The current top of the git tree doesn't compile. This patch changes the prototype according to other architectures.
Indeed. Wonder why a file compiled for the _host_ starts pulling in avr32-specific include files...
Anyway, I've applied your patch since it fixes the build. But I can't help but wonder if using target-specific headers when compiling stuff for the host is a disaster waiting to happen...
Here's the error message:
gcc -g -Wall -pedantic -idirafter /home/hskinnemoen/git/u-boot/include -idirafter /home/hskinnemoen/git/u-boot/include2 -idirafter /home/hskinnemoen/git/u-boot/include -DTEXT_BASE=0x00000000 -DUSE_HOSTCC -O -c -o sha1.o sha1.c In file included from /home/hskinnemoen/git/u-boot/include/linux/string.h:21, from sha1.c:32: /home/hskinnemoen/git/u-boot/include/asm/string.h:26: error: expected declaration specifiers or ‘...’ before ‘size_t’ sha1.c: In function ‘sha1_hmac’: sha1.c:323: error: too many arguments to function ‘memset’ sha1.c:324: error: too many arguments to function ‘memset’ sha1.c:344: error: too many arguments to function ‘memset’ sha1.c:345: error: too many arguments to function ‘memset’ sha1.c:346: error: too many arguments to function ‘memset’ sha1.c:347: error: too many arguments to function ‘memset’
and below is the fix. Any reason why sha1.c includes <linux/string.h> instead of just <string.h>?
Thanks for the patch!
Haavard
include/asm-avr32/string.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/asm-avr32/string.h b/include/asm-avr32/string.h index 8b05d1a..58582a3 100644 --- a/include/asm-avr32/string.h +++ b/include/asm-avr32/string.h @@ -23,6 +23,6 @@ #define __ASM_AVR32_STRING_H
#define __HAVE_ARCH_MEMSET -extern void *memset(void *s, int c, size_t n); +extern void *memset(void *s, int c, __kernel_size_t n);
#endif /* __ASM_AVR32_STRING_H */