mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue