Fix darwin open flags and mode

This commit is contained in:
Hasen Judy
2020-04-19 01:39:22 +09:00
parent f229084baa
commit 705984f828
2 changed files with 15 additions and 16 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ write_entire_file :: proc(name: string, data: []byte, truncate := true) -> (succ
}
mode: int = 0;
when OS == "linux" {
when OS == "linux" || OS == "darwin" {
// NOTE(justasd): 644 (owner read, write; group read; others read)
mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
}