From 84e323334c153cd79f8ee900df0f8af71852ed2c Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 19 Aug 2021 18:26:22 +0200 Subject: [PATCH] Fix recent android build regression --- libr/bin/p/bin_smd.c | 2 +- libr/core/vmenus.c | 2 +- libr/debug/p/native/linux/linux_debug.c | 2 +- libr/include/r_types.h | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libr/bin/p/bin_smd.c b/libr/bin/p/bin_smd.c index ac49c7a1e9..6f3dfc48a8 100644 --- a/libr/bin/p/bin_smd.c +++ b/libr/bin/p/bin_smd.c @@ -153,7 +153,7 @@ static RList *symbols(RBinFile *bf) { if (!(ret = r_list_newf (free))) { return NULL; } - SMD_Header hdr = {0}; + SMD_Header hdr = {{0}}; int left = r_buf_read_at (bf->buf, 0x100, (ut8*)&hdr, sizeof (hdr)); if (left < sizeof (SMD_Header)) { return NULL; diff --git a/libr/core/vmenus.c b/libr/core/vmenus.c index b70f2e3ac7..d29ed66a76 100644 --- a/libr/core/vmenus.c +++ b/libr/core/vmenus.c @@ -3308,7 +3308,7 @@ R_API void r_core_visual_debugtraces(RCore *core, const char *input) { } else { ch = r_cons_readchar (); } - if (ch == 4 || ch == -1) { + if (ch == 4 || (int)ch == -1) { if (level == 0) { goto beach; } diff --git a/libr/debug/p/native/linux/linux_debug.c b/libr/debug/p/native/linux/linux_debug.c index 0df07eae23..5c06c4fc05 100644 --- a/libr/debug/p/native/linux/linux_debug.c +++ b/libr/debug/p/native/linux/linux_debug.c @@ -1170,7 +1170,7 @@ int linux_reg_read(RDebug *dbg, int type, ut8 *buf, int size) { .iov_base = ®s, .iov_len = sizeof (regs) }; - ret = r_debug_ptrace (dbg, PTRACE_GETREGSET, pid, 1, &io); + ret = r_debug_ptrace (dbg, PTRACE_GETREGSET, pid, (size_t)1, &io); // ret = ptrace (PTRACE_GETREGSET, pid, (void*)(size_t)(NT_PRSTATUS), NULL); // &io); #elif __BSD__ && (__POWERPC__ || __sparc__) ret = r_debug_ptrace (dbg, PTRACE_GETREGS, pid, ®s, NULL); diff --git a/libr/include/r_types.h b/libr/include/r_types.h index 7a4d5adbdf..cf3dfe1619 100644 --- a/libr/include/r_types.h +++ b/libr/include/r_types.h @@ -166,11 +166,12 @@ #endif #endif -#if EMSCRIPTEN || __wasi__ || defined(__serenity__) #undef HAVE_PTY +#if EMSCRIPTEN || __wasi__ || defined(__serenity__) #define HAVE_PTY 0 #else -#define HAVE_PTY __UNIX__ && !__ANDROID__ && LIBC_HAVE_FORK && !__sun +// #define HAVE_PTY __UNIX__ && !__ANDROID__ && LIBC_HAVE_FORK && !__sun +#define HAVE_PTY __UNIX__ && LIBC_HAVE_FORK && !__sun #endif