mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
powerpc: Fix mktree build error on Mac OS X host
The mktree utility defines some variables as "uint", although this is not a standard C type, and so cross-compiling on Mac OS X fails. Change this to "unsigned int". Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
ba10eedf5a
commit
93f1cc609c
1 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int in_fd, out_fd;
|
int in_fd, out_fd;
|
||||||
int nblks, i;
|
int nblks, i;
|
||||||
uint cksum, *cp;
|
unsigned int cksum, *cp;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
boot_block_t bt;
|
boot_block_t bt;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
cksum = 0;
|
cksum = 0;
|
||||||
cp = (void *)&bt;
|
cp = (void *)&bt;
|
||||||
for (i=0; i<sizeof(bt)/sizeof(uint); i++)
|
for (i = 0; i < sizeof(bt) / sizeof(unsigned int); i++)
|
||||||
cksum += *cp++;
|
cksum += *cp++;
|
||||||
|
|
||||||
/* Assume zImage is an ELF file, and skip the 64K header.
|
/* Assume zImage is an ELF file, and skip the 64K header.
|
||||||
|
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
||||||
exit(4);
|
exit(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*(uint *)tmpbuf) != htonl(0x7f454c46)) {
|
if ((*(unsigned int *)tmpbuf) != htonl(0x7f454c46)) {
|
||||||
fprintf(stderr, "%s is not an ELF image\n", argv[1]);
|
fprintf(stderr, "%s is not an ELF image\n", argv[1]);
|
||||||
exit(4);
|
exit(4);
|
||||||
}
|
}
|
||||||
|
@ -125,8 +125,8 @@ int main(int argc, char *argv[])
|
||||||
perror("zImage read");
|
perror("zImage read");
|
||||||
exit(5);
|
exit(5);
|
||||||
}
|
}
|
||||||
cp = (uint *)tmpbuf;
|
cp = (unsigned int *)tmpbuf;
|
||||||
for (i=0; i<sizeof(tmpbuf)/sizeof(uint); i++)
|
for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++)
|
||||||
cksum += *cp++;
|
cksum += *cp++;
|
||||||
if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
|
if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
|
||||||
perror("boot-image write");
|
perror("boot-image write");
|
||||||
|
|
Loading…
Reference in a new issue