mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
std.os: another workaround for stage1 @minimum
behavior
This is a companion commit to 0915d24e6b
.
This commit is contained in:
parent
0915d24e6b
commit
0536c25578
@ -5439,7 +5439,9 @@ pub fn sendfile(
|
||||
}
|
||||
|
||||
// Here we match BSD behavior, making a zero count value send as many bytes as possible.
|
||||
const adjusted_count = if (in_len == 0) max_count else @minimum(in_len, @as(size_t, max_count));
|
||||
const adjusted_count_tmp = if (in_len == 0) max_count else @minimum(in_len, @as(size_t, max_count));
|
||||
// TODO we should not need this cast; improve return type of @minimum
|
||||
const adjusted_count = @intCast(usize, adjusted_count_tmp);
|
||||
|
||||
const sendfile_sym = if (builtin.link_libc)
|
||||
system.sendfile64
|
||||
|
Loading…
Reference in New Issue
Block a user