diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-06-12 18:10:01 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2010-06-12 18:10:01 +0000 |
commit | 5ec4eabfcb534df62171372f28f5cd0aea83dbb7 (patch) | |
tree | ee23ecbd1ec89efdd81847c12684721a5c3ba04f /tools/firmware-utils/src/mktitanimg.c | |
parent | ce5d644ac11b1c94e509fa030ae0899e4a10ea1c (diff) | |
download | upstream-5ec4eabfcb534df62171372f28f5cd0aea83dbb7.tar.gz upstream-5ec4eabfcb534df62171372f28f5cd0aea83dbb7.tar.bz2 upstream-5ec4eabfcb534df62171372f28f5cd0aea83dbb7.zip |
fix mktitanimg segfault on 64-bits hosts (#7443)
SVN-Revision: 21767
Diffstat (limited to 'tools/firmware-utils/src/mktitanimg.c')
-rw-r--r-- | tools/firmware-utils/src/mktitanimg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/mktitanimg.c b/tools/firmware-utils/src/mktitanimg.c index fc4422ad2f..cca4a0ebae 100644 --- a/tools/firmware-utils/src/mktitanimg.c +++ b/tools/firmware-utils/src/mktitanimg.c @@ -1,6 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <libgen.h> #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"); |