hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit dbd2d7a542ae38337ff7e34758262bd0a1cebcb0
parent e512d3d42dcfd2c9a5dcfca0c7c536e301d61eb7
Author: Lorenz (xha) <me@xha.li>
Date:   Thu,  7 Dec 2023 18:11:01 +0100

remove the fs::flag::TRUNC argument from os::create in cmd::hare

this caused the OpenBSD build to break since we don't specify either
O_RDONLY, O_WRONLY or O_RDWR. the linux documentation also says one
of the flags must be included but doesn't enforce this for some reason.

Signed-off-by: Lorenz (xha) <me@xha.li>

Diffstat:
Mcmd/hare/build/queue.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/hare/build/queue.ha b/cmd/hare/build/queue.ha @@ -134,7 +134,7 @@ fn run_task(ctx: *context, jobs: *[]job, t: *task) (bool | error) = { path::set(&buf, out)?; let tmp = path::push_ext(&buf, "tmp")?; - io::close(os::create(tmp, 0o644, fs::flag::TRUNC)?)?; + io::close(os::create(tmp, 0o644)?)?; let args = get_args(ctx, tmp, flags, t); defer strings::freeall(args);