From 4ca2579454e10b412cd1cb0d2af3385b0294e276 Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 21 Mar 2023 12:34:26 +0100 Subject: [PATCH] getcpu is reserved by linux's sched.h ##build --- libr/arch/p/any_as/plugin.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libr/arch/p/any_as/plugin.c b/libr/arch/p/any_as/plugin.c index 12bae1f0dd..f1c1052c99 100644 --- a/libr/arch/p/any_as/plugin.c +++ b/libr/arch/p/any_as/plugin.c @@ -1,14 +1,11 @@ -/* Copyright (C) 2008-2022 - pancake */ +/* Copyright (C) 2008-2023 - pancake */ #include #include "binutils_as.c" -static const char *getcpu(RArchSession *s) { +static const char *mycpu(RArchSession *s) { const char *cpu = s->config->cpu; - if (!cpu) { - return R_SYS_ARCH; - } - return cpu; + return cpu? cpu: R_SYS_ARCH; } #define ASSEMBLER32 "R2_ARM32_AS" @@ -20,7 +17,7 @@ static bool as_encode(RArchSession *s, RAnalOp *op, RArchEncodeMask mask) { // TODO: find in PATH gas = strdup ("as"); } - const char *cpu = getcpu (s); + const char *cpu = mycpu (s); if (!strcmp (cpu, "ppc")) { char cmd_opt[4096]; snprintf (cmd_opt, sizeof (cmd_opt), "-mregnames -a%d %s", s->config->bits,