zig

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

commit 06f70c030af35d052784cd448f779c21cb9ea177 (tree)
parent 0d66112643286a754101eb71382f860ae1874012
Author: Ganesan Rajagopal <rganesan@gmail.com>
Date:   Wed, 21 Dec 2022 16:01:05 +0530

Fix missing pthread_key_t definition on linux

* pthread_key_t should also be available for non-android platforms
* Also change the type to c_uint because Linux pthreadtypes.h typedefs it as "unsigned int"

Partially addresses #13950
Diffstat:
Mlib/std/c/linux.zig | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/std/c/linux.zig b/lib/std/c/linux.zig @@ -320,9 +320,7 @@ pub const pthread_rwlock_t = switch (native_abi) { size: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56, }, }; -pub usingnamespace if (native_abi == .android) struct { - pub const pthread_key_t = c_int; -} else struct {}; +pub const pthread_key_t = c_uint; pub const sem_t = extern struct { __size: [__SIZEOF_SEM_T]u8 align(@alignOf(usize)), };