open p_mode now also supported on UNIX

This commit is contained in:
2021-12-31 10:41:39 +08:00
parent 1f6f0acf05
commit 027f22abd3
2 changed files with 2 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ int fileop::open(std::string fn, int& fd, int oflag, int shflag, int pmode) {
fd = tmfd;
return fd == -1 ? err : 0;
#else
fd = ::open(fn.c_str(), oflag);
fd = ::open(fn.c_str(), oflag, pmode);
return fd == -1 ? errno : 0;
#endif
}