From 02720f8bc44f06db173af8ad6d70f9da051fe423 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 12 Jun 2010 18:10:01 +0000 Subject: [PATCH] fix mktitanimg segfault on 64-bits hosts (#7443) SVN-Revision: 21767 --- src/mktitanimg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mktitanimg.c b/src/mktitanimg.c index fc4422a..cca4a0e 100644 --- a/src/mktitanimg.c +++ b/src/mktitanimg.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "mktitanimg.h" @@ -55,7 +56,7 @@ void mknspimg_print_hdr(struct nsp_img_hdr *hdr) printf("Offset Sect info: 0x%x\n", hdr->head.sect_info_offset); printf("Offset Sections: 0x%x\n", hdr->sect_info.sections_offset); - chksum=(struct nsp_img_hdr_chksum *)((unsigned int)hdr+hdr->head.chksum_offset); + chksum=(struct nsp_img_hdr_chksum *)(hdr+hdr->head.chksum_offset); printf("Header Checksum: 0x%x\n", chksum->hdr_chksum); printf("+++ Section Information +++\n"); -- 2.30.2