| author | |
| committer | |
| log | 9c03b39d1ebb52a94f1e6ee6f92a19f54a0ee528 |
| tree | 42aef60c93fe96e6dc6004beb10c5a3eaf8daa51 |
| parent | 2d119677344c4ca6a2700b8de0a24215b9a37c06 |
| parent | c3675d9351e78e80d337f410f8334f2ed9fae6d0 |
| signature |
Initialize the Stat structure2 files changed, 2 insertions(+), 6 deletions(-)
lib/std/os.zig+2-2| ... | ... | @@ -3408,7 +3408,7 @@ pub fn fstat(fd: fd_t) FStatError!Stat { |
| 3408 | 3408 | @compileError("fstat is not yet implemented on Windows"); |
| 3409 | 3409 | } |
| 3410 | 3410 | |
| 3411 | var stat: Stat = undefined; | |
| 3411 | var stat = mem.zeroes(Stat); | |
| 3412 | 3412 | switch (errno(system.fstat(fd, &stat))) { |
| 3413 | 3413 | 0 => return stat, |
| 3414 | 3414 | EINVAL => unreachable, |
| ... | ... | @@ -3459,7 +3459,7 @@ pub fn fstatatWasi(dirfd: fd_t, pathname: []const u8, flags: u32) FStatAtError!S |
| 3459 | 3459 | /// Same as `fstatat` but `pathname` is null-terminated. |
| 3460 | 3460 | /// See also `fstatat`. |
| 3461 | 3461 | pub fn fstatatZ(dirfd: fd_t, pathname: [*:0]const u8, flags: u32) FStatAtError!Stat { |
| 3462 | var stat: Stat = undefined; | |
| 3462 | var stat = mem.zeroes(Stat); | |
| 3463 | 3463 | switch (errno(system.fstatat(dirfd, pathname, &stat, flags))) { |
| 3464 | 3464 | 0 => return stat, |
| 3465 | 3465 | EINVAL => unreachable, |
lib/std/os/test.zig-4| ... | ... | @@ -263,10 +263,6 @@ test "linkat with different directories" { |
| 263 | 263 | test "fstatat" { |
| 264 | 264 | // enable when `fstat` and `fstatat` are implemented on Windows |
| 265 | 265 | if (builtin.os.tag == .windows) return error.SkipZigTest; |
| 266 | if (builtin.os.tag == .freebsd and builtin.mode == .ReleaseFast) { | |
| 267 | // https://github.com/ziglang/zig/issues/8538 | |
| 268 | return error.SkipZigTest; | |
| 269 | } | |
| 270 | 266 | |
| 271 | 267 | var tmp = tmpDir(.{}); |
| 272 | 268 | defer tmp.cleanup(); |