authorgravatar for sunb@qmrz.net孙冰 <sunb@qmrz.net> 2025-03-11 15:45:04+08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-03-12 12:25:20-07:00
log99b5a4f29459b1ee2a1b00b51ffec3bafa2b6632
treeb30013190420ea48ee33cc0614c4d4b7f5ff2111
parent22b7d0228261e040d64b2706918ee7582d4d2b6d

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

1 files changed, 4 insertions(+), 1 deletions(-)

lib/std/c.zig+4-1
...@@ -2269,7 +2269,10 @@ pub const SC = switch (native_os) {...@@ -2269,7 +2269,10 @@ pub const SC = switch (native_os) {
2269 else => void,2269 else => void,
2270};2270};
22712271
2272pub const _SC = switch (native_os) {2272pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) {
2273 PAGESIZE = 39,
2274 NPROCESSORS_ONLN = 97,
2275} else switch (native_os) {
2273 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {2276 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {
2274 PAGESIZE = 29,2277 PAGESIZE = 29,
2275 },2278 },