diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2024-03-20 11:45:41 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-03-20 14:06:35 -0700 |
| commit | e4ed63f1384902f5662b66203ebb3415e0cbfdb2 (patch) | |
| tree | 01157cde7a3ec3cf8bb5fb8d6183690a73a33534 /lib/std/Thread/Futex.zig | |
| parent | 5005c6243a37f7fc9f23dae298b0dafa085fa044 (diff) | |
| download | zig-e4ed63f1384902f5662b66203ebb3415e0cbfdb2.tar.gz zig-e4ed63f1384902f5662b66203ebb3415e0cbfdb2.zip | |
bsd: followup to std.posix extraction from std.os
netbsd fix:
- `Futex.zig:542:56: error: expected error union type, found 'c_int'`
openbsd fix:
- `emutls.zig:10:21: error: root struct of file 'os' has no member named 'abort'`
- `Thread.zig:627:22: error: expected 6 argument(s), found 5`
Diffstat (limited to 'lib/std/Thread/Futex.zig')
| -rw-r--r-- | lib/std/Thread/Futex.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig index 2a81a4a535..39afe249d1 100644 --- a/lib/std/Thread/Futex.zig +++ b/lib/std/Thread/Futex.zig @@ -539,7 +539,7 @@ const PosixImpl = struct { // This can be changed with pthread_condattr_setclock, but it's an extension and may not be available everywhere. var ts: c.timespec = undefined; if (timeout) |timeout_ns| { - c.clock_gettime(c.CLOCK.REALTIME, &ts) catch unreachable; + std.posix.clock_gettime(c.CLOCK.REALTIME, &ts) catch unreachable; ts.tv_sec +|= @as(@TypeOf(ts.tv_sec), @intCast(timeout_ns / std.time.ns_per_s)); ts.tv_nsec += @as(@TypeOf(ts.tv_nsec), @intCast(timeout_ns % std.time.ns_per_s)); |
