authorgravatar for sunb@qmrz.net孙冰 <sunb@qmrz.net> 2025-03-11 15:45:04+08:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-03-11 21:41:58+01:00
log77395457fe1eb1bd7b96df1e13d4348edb5f1727
treeb4932b59b84724ef2face5738145790bffe16e04
parent982c500be5285500a236ca01c2f66e8555647a52

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
...@@ -2512,7 +2512,10 @@ pub const SC = switch (native_os) {...@@ -2512,7 +2512,10 @@ pub const SC = switch (native_os) {
2512 else => void,2512 else => void,
2513};2513};
25142514
2515pub const _SC = switch (native_os) {2515pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) {
2516 PAGESIZE = 39,
2517 NPROCESSORS_ONLN = 97,
2518} else switch (native_os) {
2516 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {2519 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {
2517 PAGESIZE = 29,2520 PAGESIZE = 29,
2518 },2521 },