Fixed build for POSIX

This commit is contained in:
Vladislav Mikhalin 2024-07-11 12:57:34 +03:00
parent 5d89f96557
commit 86aa3fe8ac
4 changed files with 7 additions and 7 deletions

View File

@ -167,7 +167,7 @@ IOFile& IOFile::operator=(IOFile&& other) noexcept {
return *this;
}
errno_t IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, FileShareFlag flag) {
int IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, FileShareFlag flag) {
Close();
file_path = path;
@ -175,7 +175,7 @@ errno_t IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, F
file_type = type;
errno = 0;
errno_t result = 0;
int result = 0;
#ifdef _WIN32
if (flag != FileShareFlag::ShareNone) {

View File

@ -102,7 +102,7 @@ public:
uintptr_t GetFileMapping();
errno_t Open(const std::filesystem::path& path, FileAccessMode mode,
int Open(const std::filesystem::path& path, FileAccessMode mode,
FileType type = FileType::BinaryFile,
FileShareFlag flag = FileShareFlag::ShareReadOnly);
void Close();

View File

@ -75,7 +75,7 @@ void ErrSceToPosix(int result) {
g_posix_errno = rt;
}
int ErrnoToSceKernelError(errno_t e) {
int ErrnoToSceKernelError(int e) {
const auto res = SCE_KERNEL_ERROR_UNKNOWN + e;
return res > SCE_KERNEL_ERROR_ESTOP ? SCE_KERNEL_ERROR_UNKNOWN : res;
}

View File

@ -13,7 +13,7 @@ class SymbolsResolver;
namespace Libraries::Kernel {
void ErrSceToPosix(int result);
int ErrnoToSceKernelError(errno_t e);
int ErrnoToSceKernelError(int e);
struct OrbisTimesec {
time_t t;