mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std: Add missing cast when calling fcntl w/ constant args
comptime_int arguments are a big no no.
This commit is contained in:
parent
f33bac2b12
commit
6418f9ae91
@ -3780,7 +3780,7 @@ pub fn pipe2(flags: u32) PipeError![2]fd_t {
|
||||
// F_SETFD.
|
||||
if (flags & O_CLOEXEC != 0) {
|
||||
for (fds) |fd| {
|
||||
switch (errno(system.fcntl(fd, F_SETFD, FD_CLOEXEC))) {
|
||||
switch (errno(system.fcntl(fd, F_SETFD, @as(u32, FD_CLOEXEC)))) {
|
||||
0 => {},
|
||||
EINVAL => unreachable, // Invalid flags
|
||||
EBADF => unreachable, // Always a race condition
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user