diff --git a/librz/debug/p/debug_native.c b/librz/debug/p/debug_native.c index 47929af53c0..7692ce0022b 100644 --- a/librz/debug/p/debug_native.c +++ b/librz/debug/p/debug_native.c @@ -767,7 +767,7 @@ static int io_perms_to_prot(int io_perms) { return prot_perms; } -#if __linux__ +#if __linux__ && !__ANDROID__ static int sys_thp_mode(void) { size_t i; const char *thp[] = { diff --git a/librz/debug/p/native/linux/linux_debug.c b/librz/debug/p/native/linux/linux_debug.c index 3ba8f6b2ebe..2d58c104902 100644 --- a/librz/debug/p/native/linux/linux_debug.c +++ b/librz/debug/p/native/linux/linux_debug.c @@ -882,6 +882,8 @@ RzList /**/ *linux_pid_list(int pid, RzList /**/ *li RZ_API ut64 get_linux_tls_val(RZ_NONNULL RzDebug *dbg, int tid) { rz_return_val_if_fail(dbg, 0); ut64 tls = 0; + +#if !__ANDROID__ int prev_tid = dbg->tid; if (dbg->tid != tid) { @@ -901,8 +903,7 @@ RZ_API ut64 get_linux_tls_val(RZ_NONNULL RzDebug *dbg, int tid) { } else { tls = rz_reg_get_value(dbg->reg, ri); } -#endif -#if __aarch64__ +#elif __aarch64__ struct iovec iovec = { 0 }; ut64 reg; @@ -921,6 +922,8 @@ RZ_API ut64 get_linux_tls_val(RZ_NONNULL RzDebug *dbg, int tid) { dbg->tid = prev_tid; rz_debug_reg_sync(dbg, RZ_REG_TYPE_GPR, false); } +#endif + return tls; } @@ -1051,11 +1054,10 @@ RzList /**/ *linux_thread_list(RzDebug *dbg, int pid, RzList /*