firmware-utils: fix build on big endian systems

This closes #9446


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27255 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Hauke Mehrtens 2011-06-21 21:13:58 +00:00
parent 16a2b890cf
commit 1f71cdebe0
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ int main(int argc, char *argv[])
/* make the 3 partition beeing 12 bytes closer from the header */ /* make the 3 partition beeing 12 bytes closer from the header */
memcpy(buf + LOAD32_LE(p->offsets[2]) - EDIMAX_HDR_LEN, buf + LOAD32_LE(p->offsets[2]), length - LOAD32_LE(p->offsets[2])); memcpy(buf + LOAD32_LE(p->offsets[2]) - EDIMAX_HDR_LEN, buf + LOAD32_LE(p->offsets[2]), length - LOAD32_LE(p->offsets[2]));
/* recompute the crc32 check */ /* recompute the crc32 check */
p->crc32 = STORE32_LE(crc32buf((char *) &(LOAD32_LE(p->flag_version)), length - offsetof(struct trx_header, flag_version))); p->crc32 = STORE32_LE(crc32buf((char *) &p->flag_version, length - offsetof(struct trx_header, flag_version)));
eh.sign = STORE32_LE(EDIMAX_PS16); eh.sign = STORE32_LE(EDIMAX_PS16);
eh.length = STORE32_LE(length); eh.length = STORE32_LE(length);