diff options
Diffstat (limited to 'util/cbfstool')
-rw-r--r-- | util/cbfstool/cbfs-mkpayload.c | 1 | ||||
-rw-r--r-- | util/cbfstool/common.h | 6 | ||||
-rw-r--r-- | util/cbfstool/lzma/C/Common/Alloc.cpp | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c index cdc5ffbb4f..baa92ff237 100644 --- a/util/cbfstool/cbfs-mkpayload.c +++ b/util/cbfstool/cbfs-mkpayload.c @@ -27,7 +27,6 @@ #include <fcntl.h> #include <getopt.h> #include <sys/stat.h> -#include <arpa/inet.h> #include "common.h" #include "cbfs.h" diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index ede06e5340..e149444d38 100644 --- a/util/cbfstool/common.h +++ b/util/cbfstool/common.h @@ -17,6 +17,12 @@ */ #include <stdint.h> +#ifndef WIN32 +#include <arpa/inet.h> +#else +#define ntohl(x) (((x)>>24) | ((x)<<24) | (((x)>>8)&0xff00) | (((x)<<8)&0xff0000)) +#define htonl ntohl +#endif extern void *offset; extern struct cbfs_header *master_header; diff --git a/util/cbfstool/lzma/C/Common/Alloc.cpp b/util/cbfstool/lzma/C/Common/Alloc.cpp index e2b8c3d289..6220a84f23 100644 --- a/util/cbfstool/lzma/C/Common/Alloc.cpp +++ b/util/cbfstool/lzma/C/Common/Alloc.cpp @@ -96,7 +96,7 @@ void *BigAlloc(size_t size) throw() if (size >= (1 << 18)) { void *res = ::VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), - MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); + MEM_COMMIT, PAGE_READWRITE); if (res != 0) return res; } |