mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-26 06:30:33 +00:00
* Theorical build fix for OpenBSD/arm/sparc64
This commit is contained in:
parent
5292c61a48
commit
9f35e4fd33
@ -72,10 +72,14 @@ R_API char *r_anal_cond_to_string(RAnalCond *cond) {
|
||||
val1 = r_anal_value_to_string (cond->arg[1]);
|
||||
if (val0) {
|
||||
if (R_ANAL_COND_SINGLE (cond)) {
|
||||
if ( (out = malloc (strlen (val0) + 10)) )
|
||||
sprintf (out, "%s%s", cnd, val0);
|
||||
} else if ( (out = malloc (strlen (val0) + strlen (val1)+10)) )
|
||||
sprintf (out, "%s %s %s", val0, cnd, val1);
|
||||
int val0len = strlen (val0) + 10;
|
||||
if ((out = malloc (val0len)))
|
||||
snprintf (out, val0len, "%s%s", cnd, val0);
|
||||
} else {
|
||||
int val0len = strlen (val0) + strlen (val1)+10;
|
||||
if ((out = malloc (val0len)))
|
||||
snprintf (out, val0len, "%s %s %s", val0, cnd, val1);
|
||||
}
|
||||
}
|
||||
free (val0);
|
||||
free (val1);
|
||||
|
@ -15,6 +15,13 @@
|
||||
#if __BSD__
|
||||
#include <machine/reg.h>
|
||||
|
||||
/* hakish hack to hack the openbsd/sparc64 hack */
|
||||
#undef reg
|
||||
#undef fpreg
|
||||
#undef fpstate
|
||||
#undef trapframe
|
||||
#undef rwindow
|
||||
|
||||
#define PTRACE_PEEKTEXT PT_READ_I
|
||||
#define PTRACE_POKETEXT PT_WRITE_I
|
||||
#define PTRACE_PEEKDATA PT_READ_D
|
||||
|
@ -247,7 +247,7 @@ R_API char *r_line_readline() {
|
||||
const char *gcomp_line = "";
|
||||
static int gcomp_idx = 0;
|
||||
static int gcomp = 0;
|
||||
char buf[10];
|
||||
signed char buf[10];
|
||||
int ch, i; /* grep completion */
|
||||
|
||||
I.buffer.index = I.buffer.length = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user