diff options
author | Timur Tabi <timur@freescale.com> | 2009-04-30 14:16:44 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-15 02:43:41 -0400 |
commit | 93f1cc609c702a83e44da51cabdd353b20c24f79 (patch) | |
tree | db8f70733352bdb3775216367619d3f95eb5b656 /arch/powerpc | |
parent | ba10eedf5a3fba991563873d4cb65a067aa13f24 (diff) |
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/boot/mktree.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/boot/mktree.c b/arch/powerpc/boot/mktree.c index 45d06a8c7cd1..c2baae0a3d89 100644 --- a/arch/powerpc/boot/mktree.c +++ b/arch/powerpc/boot/mktree.c | |||
@@ -42,7 +42,7 @@ int main(int argc, char *argv[]) | |||
42 | { | 42 | { |
43 | int in_fd, out_fd; | 43 | int in_fd, out_fd; |
44 | int nblks, i; | 44 | int nblks, i; |
45 | uint cksum, *cp; | 45 | unsigned int cksum, *cp; |
46 | struct stat st; | 46 | struct stat st; |
47 | boot_block_t bt; | 47 | boot_block_t bt; |
48 | 48 | ||
@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) | |||
90 | 90 | ||
91 | cksum = 0; | 91 | cksum = 0; |
92 | cp = (void *)&bt; | 92 | cp = (void *)&bt; |
93 | for (i=0; i<sizeof(bt)/sizeof(uint); i++) | 93 | for (i = 0; i < sizeof(bt) / sizeof(unsigned int); i++) |
94 | cksum += *cp++; | 94 | cksum += *cp++; |
95 | 95 | ||
96 | /* Assume zImage is an ELF file, and skip the 64K header. | 96 | /* Assume zImage is an ELF file, and skip the 64K header. |
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) | |||
101 | exit(4); | 101 | exit(4); |
102 | } | 102 | } |
103 | 103 | ||
104 | if ((*(uint *)tmpbuf) != htonl(0x7f454c46)) { | 104 | if ((*(unsigned int *)tmpbuf) != htonl(0x7f454c46)) { |
105 | fprintf(stderr, "%s is not an ELF image\n", argv[1]); | 105 | fprintf(stderr, "%s is not an ELF image\n", argv[1]); |
106 | exit(4); | 106 | exit(4); |
107 | } | 107 | } |
@@ -125,8 +125,8 @@ int main(int argc, char *argv[]) | |||
125 | perror("zImage read"); | 125 | perror("zImage read"); |
126 | exit(5); | 126 | exit(5); |
127 | } | 127 | } |
128 | cp = (uint *)tmpbuf; | 128 | cp = (unsigned int *)tmpbuf; |
129 | for (i=0; i<sizeof(tmpbuf)/sizeof(uint); i++) | 129 | for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++) |
130 | cksum += *cp++; | 130 | cksum += *cp++; |
131 | if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { | 131 | if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { |
132 | perror("boot-image write"); | 132 | perror("boot-image write"); |