summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-09-24 20:46:19 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-09-24 20:46:19 +0000
commit55cd14f87572150e6fb4e9e9135e344883f667e2 (patch)
tree54bbbda3f7e97fea875ddd3875bc1d34e65ff7f1 /tools
parent0cab10e2f5b16d0425713c6dfe691007510c2f4a (diff)
downloadrockbox-55cd14f87572150e6fb4e9e9135e344883f667e2.tar.gz
rockbox-55cd14f87572150e6fb4e9e9135e344883f667e2.tar.bz2
rockbox-55cd14f87572150e6fb4e9e9135e344883f667e2.zip
Make beastpatcher build with VS2005 again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22821 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/mknkboot.c12
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 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#if defined(_MSC_VER)
+#include "pstdint.h"
+#else
#include <unistd.h>
#include <inttypes.h>
+#endif
#include "mknkboot.h"
@@ -118,10 +122,10 @@ static uint32_t dualboot[] =
static void put_uint32le(uint32_t x, unsigned char* p)
{
- p[0] = x & 0xff;
- p[1] = (x >> 8) & 0xff;
- p[2] = (x >> 16) & 0xff;
- p[3] = (x >> 24) & 0xff;
+ p[0] = (unsigned char)(x & 0xff);
+ p[1] = (unsigned char)((x >> 8) & 0xff);
+ p[2] = (unsigned char)((x >> 16) & 0xff);
+ p[3] = (unsigned char)((x >> 24) & 0xff);
}
#if !defined(BEASTPATCHER)