open(O_CREATE) needs 3rd parameter.

This commit is contained in:
Kelvin Sherlock 2020-12-01 23:31:28 -05:00
parent da24b85f68
commit 225c3b8ebd
2 changed files with 1 additions and 1 deletions

View File

@ -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");
}