zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 8861ee18f7fe9559a02389f07c4e5cdc5a8ffbde (tree)
parent 6435750c99e705eb40bbdf75e51a3493d683e951
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 18 May 2021 21:01:59 -0700

std: add android __SIZEOF_PTHREAD_MUTEX_T

closes #8384

Diffstat:
Mlib/std/c/linux.zig | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/std/c/linux.zig b/lib/std/c/linux.zig @@ -161,7 +161,7 @@ pub const pthread_rwlock_t = switch (abi) { attr: i32 = 0, __reserved: [36]u8 = [_]u8{0} ** 36, }, - else => unreachable, + else => @compileError("impossible pointer size"), }, else => extern struct { size: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56, @@ -180,7 +180,8 @@ const __SIZEOF_PTHREAD_MUTEX_T = if (os_tag == .fuchsia) 40 else switch (abi) { .mips64, .powerpc64, .powerpc64le, .sparcv9 => 40, else => if (@sizeOf(usize) == 8) 40 else 24, }, - else => unreachable, + .android => if (@sizeOf(usize) == 8) 40 else 4, + else => @compileError("unsupported ABI"), }; const __SIZEOF_SEM_T = 4 * @sizeOf(usize);