| ... | @@ -11085,6 +11085,13 @@ fn timestampFromPosix(timespec: *const posix.timespec) Io.Timestamp { | ... | @@ -11085,6 +11085,13 @@ fn timestampFromPosix(timespec: *const posix.timespec) Io.Timestamp { |
| 11085 | } | 11085 | } |
| 11086 | | 11086 | |
| 11087 | fn timestampToPosix(nanoseconds: i96) posix.timespec { | 11087 | fn timestampToPosix(nanoseconds: i96) posix.timespec { |
| | 11088 | if (builtin.zig_backend == .stage2_wasm) { |
| | 11089 | // Workaround for https://codeberg.org/ziglang/zig/issues/30575 |
| | 11090 | return .{ |
| | 11091 | .sec = @intCast(@divTrunc(nanoseconds, std.time.ns_per_s)), |
| | 11092 | .nsec = @intCast(@rem(nanoseconds, std.time.ns_per_s)), |
| | 11093 | }; |
| | 11094 | } |
| 11088 | return .{ | 11095 | return .{ |
| 11089 | .sec = @intCast(@divFloor(nanoseconds, std.time.ns_per_s)), | 11096 | .sec = @intCast(@divFloor(nanoseconds, std.time.ns_per_s)), |
| 11090 | .nsec = @intCast(@mod(nanoseconds, std.time.ns_per_s)), | 11097 | .nsec = @intCast(@mod(nanoseconds, std.time.ns_per_s)), |