From 99b5a4f29459b1ee2a1b00b51ffec3bafa2b6632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=86=B0?= Date: Tue, 11 Mar 2025 15:45:04 +0800 Subject: [PATCH] std.c: fix sysconf names (std.c._SC) for android api c.f. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/sysconf.h --- lib/std/c.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/std/c.zig b/lib/std/c.zig index 9b7d36cb32..7fb0699280 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -2269,7 +2269,10 @@ pub const SC = switch (native_os) { else => void, }; -pub const _SC = switch (native_os) { +pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) { + PAGESIZE = 39, + NPROCESSORS_ONLN = 97, +} else switch (native_os) { .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) { PAGESIZE = 29, },