void-packages/srcpkgs/radare2/patches/d9d5f79278c0413582e056850184cb5ee0767727.patch
2017-03-14 07:07:44 +00:00

24 lines
872 B
Diff

From d9d5f79278c0413582e056850184cb5ee0767727 Mon Sep 17 00:00:00 2001
From: Levente Polyak <levente@leventepolyak.net>
Date: Mon, 13 Mar 2017 17:59:26 +0100
Subject: [PATCH] Fix capstone3 build regression introduced in
7722c0ae84967530e902b271b0eeb7b39964fa9a (#7020)
---
libr/anal/p/anal_x86_cs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libr/anal/p/anal_x86_cs.c b/libr/anal/p/anal_x86_cs.c
index 47e288f..dfdc071 100644
--- libr/anal/p/anal_x86_cs.c
+++ libr/anal/p/anal_x86_cs.c
@@ -72,7 +72,9 @@ static void opex(RStrBuf *buf, csh handle, cs_insn *insn) {
r_strbuf_append (buf, ",");
}
r_strbuf_appendf (buf, "{\"size\":%d", op->size);
+#if CS_API_MAJOR >= 4
r_strbuf_appendf (buf, ",\"rw\":%d", op->access); // read , write, read|write
+#endif
switch (op->type) {
case X86_OP_REG:
r_strbuf_appendf (buf, ",\"type\":\"reg\"");