mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
Fixed build for POSIX
This commit is contained in:
parent
5d89f96557
commit
86aa3fe8ac
@ -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) {
|
||||||
|
@ -102,7 +102,7 @@ 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();
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user