From d7e944a628c57e2c980b7c9b1aeb84a24930104c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=86=B0?= Date: Mon, 24 Mar 2025 20:35:06 +0800 Subject: [PATCH 1/2] std.Target: Update default Android API level to 24 API level 24 completes _FILE_OFFSET_BITS=64 support in bionic, c.f. https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md. According to https://apilevels.com, API level 24 (Android 7 released in 2017) has 97% cumulative usage. --- lib/std/Target.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 79a78a41df..32b8bfa1b5 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -482,7 +482,7 @@ pub const Os = struct { break :blk default_min; }, - .android = 14, + .android = 24, }, }, .rtems => .{ From 0118912e2d844d669ed67352064235854102fdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=86=B0?= Date: Wed, 26 Mar 2025 20:00:05 +0800 Subject: [PATCH 2/2] std.posix: update LFS64 interfaces for android bionic C --- lib/std/posix.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/posix.zig b/lib/std/posix.zig index f920784ca5..3676906678 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -7479,7 +7479,7 @@ pub fn ioctl_SIOCGIFINDEX(fd: fd_t, ifr: *ifreq) IoCtl_SIOCGIFINDEX_Error!void { } } -const lfs64_abi = native_os == .linux and builtin.link_libc and builtin.abi.isGnu(); +const lfs64_abi = native_os == .linux and builtin.link_libc and (builtin.abi.isGnu() or builtin.abi.isAndroid()); /// Whether or not `error.Unexpected` will print its value and a stack trace. ///