From 59dd7a0fbd5c06b89eea965b5fbc3f25e3eb21db Mon Sep 17 00:00:00 2001 From: George Thayamkery Date: Thu, 30 May 2024 11:49:30 -0500 Subject: [PATCH] not android check on std.debug.getContext have_getcontext must be false for android, this makes sure that std.debug.getContext wont call the non-existant function (and thus hit a compileError) --- lib/std/debug.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index eaa5ca9ff7..c7d4818e18 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -228,8 +228,8 @@ pub fn relocateContext(context: *ThreadContext) void { }; } -pub const have_getcontext = @hasDecl(posix.system, "getcontext") and - native_os != .openbsd and native_os != .haiku and +pub const have_getcontext = native_os != .openbsd and native_os != .haiku and + !builtin.target.isAndroid() and (native_os != .linux or switch (builtin.cpu.arch) { .x86, .x86_64,