ports/devel/capstone/main/patches/patch-cs_c

29 lines
975 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
The 'mips' symbol is special on MIPS platforms, so rename it to prevent a
conflict.
Index: cs.c
--- cs.c.orig
+++ cs.c
@@ -1312,8 +1312,8 @@ int CAPSTONE_API cs_op_count(csh ud, const cs_insn *in
count++;
break;
case CS_ARCH_MIPS:
- for (i = 0; i < insn->detail->mips.op_count; i++)
- if (insn->detail->mips.operands[i].type == (mips_op_type)op_type)
+ for (i = 0; i < insn->detail->mipsen.op_count; i++)
+ if (insn->detail->mipsen.operands[i].type == (mips_op_type)op_type)
count++;
break;
case CS_ARCH_PPC:
@@ -1420,8 +1420,8 @@ int CAPSTONE_API cs_op_index(csh ud, const cs_insn *in
}
break;
case CS_ARCH_MIPS:
- for (i = 0; i < insn->detail->mips.op_count; i++) {
- if (insn->detail->mips.operands[i].type == (mips_op_type)op_type)
+ for (i = 0; i < insn->detail->mipsen.op_count; i++) {
+ if (insn->detail->mipsen.operands[i].type == (mips_op_type)op_type)
count++;
if (count == post)
return i;