diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-21 20:41:30 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-21 20:41:30 -0500 |
| commit | e3404e3c78307092e849dc0609f77932b263e3fc (patch) | |
| tree | a421b07b96689a975091f941e94f0d3f3bac0740 /lib/std/event/loop.zig | |
| parent | 874b34a30f588294210fe91d08e29fc6baa1a0a4 (diff) | |
| parent | cd5f4de2a684ab0a3383ff328516243a6e850201 (diff) | |
| download | zig-e3404e3c78307092e849dc0609f77932b263e3fc.tar.gz zig-e3404e3c78307092e849dc0609f77932b263e3fc.zip | |
Merge branch 'std.fs.Dir.openRead'
Diffstat (limited to 'lib/std/event/loop.zig')
| -rw-r--r-- | lib/std/event/loop.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 8f01c19746..44174c862c 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -856,7 +856,8 @@ pub const Loop = struct { }, .Close => |*msg| noasync os.close(msg.fd), .WriteFile => |*msg| blk: { - const flags = os.O_LARGEFILE | os.O_WRONLY | os.O_CREAT | + const O_LARGEFILE = if (@hasDecl(os, "O_LARGEFILE")) os.O_LARGEFILE else 0; + const flags = O_LARGEFILE | os.O_WRONLY | os.O_CREAT | os.O_CLOEXEC | os.O_TRUNC; const fd = noasync os.openC(msg.path.ptr, flags, msg.mode) catch |err| { msg.result = err; |
