Skip to content

Commit 06f70c0

Browse files
rganesanandrewrk
authored andcommitted
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
1 parent 0d66112 commit 06f70c0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/std/c/linux.zig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ pub const pthread_rwlock_t = switch (native_abi) {
320320
size: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56,
321321
},
322322
};
323-
pub usingnamespace if (native_abi == .android) struct {
324-
pub const pthread_key_t = c_int;
325-
} else struct {};
323+
pub const pthread_key_t = c_uint;
326324
pub const sem_t = extern struct {
327325
__size: [__SIZEOF_SEM_T]u8 align(@alignOf(usize)),
328326
};

0 commit comments

Comments
 (0)