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; 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(); Close();
file_path = path; file_path = path;
@ -175,7 +175,7 @@ errno_t IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, F
file_type = type; file_type = type;
errno = 0; errno = 0;
errno_t result = 0; int result = 0;
#ifdef _WIN32 #ifdef _WIN32
if (flag != FileShareFlag::ShareNone) { if (flag != FileShareFlag::ShareNone) {

View File

@ -102,9 +102,9 @@ public:
uintptr_t GetFileMapping(); 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, FileType type = FileType::BinaryFile,
FileShareFlag flag = FileShareFlag::ShareReadOnly); FileShareFlag flag = FileShareFlag::ShareReadOnly);
void Close(); void Close();
bool Flush() const; bool Flush() const;

View File

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

View File

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