From 225c3b8ebd4ffba4c379704b83bf3d6acbe83338 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 1 Dec 2020 23:31:28 -0500 Subject: [PATCH] open(O_CREATE) needs 3rd parameter. --- .github/workflows/{cmake.yml => cmake-macos.yml} | 0 cxx/mapped_file.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{cmake.yml => cmake-macos.yml} (100%) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake-macos.yml similarity index 100% rename from .github/workflows/cmake.yml rename to .github/workflows/cmake-macos.yml diff --git a/cxx/mapped_file.cpp b/cxx/mapped_file.cpp index 009babe..1b7b90a 100644 --- a/cxx/mapped_file.cpp +++ b/cxx/mapped_file.cpp @@ -278,7 +278,7 @@ void mapped_file_base::create(const path_type& p, size_t length) { if (is_open()) close(); - fd = ::open(p.c_str(), O_RDWR | O_CREAT | O_TRUNC); + fd = ::open(p.c_str(), O_RDWR | O_CREAT | O_TRUNC, 0666); if (fd < 0) { return set_or_throw_error(nullptr, "open"); }