From 2897a80caf41c7c34689ea7e72802e204a60fa10 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 21 Oct 2016 17:03:27 +0800 Subject: [PATCH] cstool: fix compilation bug --- cstool/cstool_arm.c | 2 +- cstool/cstool_arm64.c | 2 +- cstool/cstool_mips.c | 2 +- cstool/cstool_ppc.c | 5 +++-- cstool/cstool_sparc.c | 2 +- cstool/cstool_systemz.c | 2 +- cstool/cstool_x86.c | 2 +- cstool/cstool_xcore.c | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cstool/cstool_arm.c b/cstool/cstool_arm.c index 5453fa696..65f281f7c 100644 --- a/cstool/cstool_arm.c +++ b/cstool/cstool_arm.c @@ -1,7 +1,7 @@ #include #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); diff --git a/cstool/cstool_arm64.c b/cstool/cstool_arm64.c index 25a402f8a..e91b6a9e3 100644 --- a/cstool/cstool_arm64.c +++ b/cstool/cstool_arm64.c @@ -4,7 +4,7 @@ #include #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); diff --git a/cstool/cstool_mips.c b/cstool/cstool_mips.c index 45faba7b8..8e5d13973 100644 --- a/cstool/cstool_mips.c +++ b/cstool/cstool_mips.c @@ -4,7 +4,7 @@ #include #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); diff --git a/cstool/cstool_ppc.c b/cstool/cstool_ppc.c index 771d88e71..141a5acbc 100644 --- a/cstool/cstool_ppc.c +++ b/cstool/cstool_ppc.c @@ -1,9 +1,10 @@ /* Capstone Disassembler Engine */ /* By Nguyen Anh Quynh , 2013> */ +#include #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); @@ -58,7 +59,7 @@ void print_insn_detail_ppc(csh handle, cs_insn *ins) printf("\t\toperands[%u].type: REG = %s\n", i, cs_reg_name(handle, op->reg)); break; case PPC_OP_IMM: - printf("\t\toperands[%u].type: IMM = 0x%x\n", i, op->imm); + printf("\t\toperands[%u].type: IMM = 0x%"PRIx64"\n", i, op->imm); break; case PPC_OP_MEM: printf("\t\toperands[%u].type: MEM\n", i); diff --git a/cstool/cstool_sparc.c b/cstool/cstool_sparc.c index 34bd9ca7d..f4729aa1f 100644 --- a/cstool/cstool_sparc.c +++ b/cstool/cstool_sparc.c @@ -3,7 +3,7 @@ #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); diff --git a/cstool/cstool_systemz.c b/cstool/cstool_systemz.c index f35d6f836..8f94d6b88 100644 --- a/cstool/cstool_systemz.c +++ b/cstool/cstool_systemz.c @@ -3,7 +3,7 @@ #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); diff --git a/cstool/cstool_x86.c b/cstool/cstool_x86.c index 0b091af04..36c175662 100644 --- a/cstool/cstool_x86.c +++ b/cstool/cstool_x86.c @@ -4,7 +4,7 @@ #include #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len); diff --git a/cstool/cstool_xcore.c b/cstool/cstool_xcore.c index 8d537bb95..cb377dbfd 100644 --- a/cstool/cstool_xcore.c +++ b/cstool/cstool_xcore.c @@ -2,7 +2,7 @@ /* By Nguyen Anh Quynh , 2013-2014 */ #include -#include +#include void print_string_hex(char *comment, unsigned char *str, size_t len);