diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mknkboot.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/mknkboot.c b/tools/mknkboot.c index e63840427e..6ac26428bc 100644 --- a/tools/mknkboot.c +++ b/tools/mknkboot.c | |||
@@ -42,8 +42,12 @@ | |||
42 | #include <sys/types.h> | 42 | #include <sys/types.h> |
43 | #include <sys/stat.h> | 43 | #include <sys/stat.h> |
44 | #include <fcntl.h> | 44 | #include <fcntl.h> |
45 | #if defined(_MSC_VER) | ||
46 | #include "pstdint.h" | ||
47 | #else | ||
45 | #include <unistd.h> | 48 | #include <unistd.h> |
46 | #include <inttypes.h> | 49 | #include <inttypes.h> |
50 | #endif | ||
47 | 51 | ||
48 | #include "mknkboot.h" | 52 | #include "mknkboot.h" |
49 | 53 | ||
@@ -118,10 +122,10 @@ static uint32_t dualboot[] = | |||
118 | 122 | ||
119 | static void put_uint32le(uint32_t x, unsigned char* p) | 123 | static void put_uint32le(uint32_t x, unsigned char* p) |
120 | { | 124 | { |
121 | p[0] = x & 0xff; | 125 | p[0] = (unsigned char)(x & 0xff); |
122 | p[1] = (x >> 8) & 0xff; | 126 | p[1] = (unsigned char)((x >> 8) & 0xff); |
123 | p[2] = (x >> 16) & 0xff; | 127 | p[2] = (unsigned char)((x >> 16) & 0xff); |
124 | p[3] = (x >> 24) & 0xff; | 128 | p[3] = (unsigned char)((x >> 24) & 0xff); |
125 | } | 129 | } |
126 | 130 | ||
127 | #if !defined(BEASTPATCHER) | 131 | #if !defined(BEASTPATCHER) |