mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
std.os.linux: Also use kernel_timespec for riscv32 when libc is linked.
Both glibc and musl use time64 as the base ABI for riscv32. This fixes the `sleep` test in `std.time` hanging forever due to the libc functions reading bogus values.
This commit is contained in:
parent
537cb49eb2
commit
6364995d3f
@ -7452,7 +7452,7 @@ pub const kernel_timespec = extern struct {
|
||||
};
|
||||
|
||||
// https://github.com/ziglang/zig/issues/4726#issuecomment-2190337877
|
||||
pub const timespec = if (!builtin.link_libc and native_arch == .riscv32) kernel_timespec else extern struct {
|
||||
pub const timespec = if (native_arch == .riscv32) kernel_timespec else extern struct {
|
||||
sec: isize,
|
||||
nsec: isize,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user