mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-01 10:49:02 +02:00
fuck macos
This commit is contained in:
parent
a361a6eb7f
commit
9db2b59014
1 changed files with 5 additions and 2 deletions
|
|
@ -274,9 +274,9 @@ void IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, File
|
||||||
} else {
|
} else {
|
||||||
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
||||||
}
|
}
|
||||||
#elif defined(__HAIKU__) || defined(__managarm__) || defined(__OPENORBIS__)
|
#elif defined(__HAIKU__) || defined(__managarm__) || defined(__OPENORBIS__) || defined(__APPLE__)
|
||||||
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
||||||
#else
|
#elif defined(__unix__)
|
||||||
if (type == FileType::BinaryFile && mode == FileAccessMode::Read) {
|
if (type == FileType::BinaryFile && mode == FileAccessMode::Read) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
mmap_fd = open(path.c_str(), O_RDONLY);
|
mmap_fd = open(path.c_str(), O_RDONLY);
|
||||||
|
|
@ -327,6 +327,9 @@ void IOFile::Open(const fs::path& path, FileAccessMode mode, FileType type, File
|
||||||
if (mmap_fd == -1) {
|
if (mmap_fd == -1) {
|
||||||
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Some other fancy OS (ahem fucking Darwin/Mac OSX)
|
||||||
|
file = std::fopen(path.c_str(), AccessModeToStr(mode, type));
|
||||||
#endif
|
#endif
|
||||||
if (!IsOpen()) {
|
if (!IsOpen()) {
|
||||||
const auto ec = std::error_code{errno, std::generic_category()};
|
const auto ec = std::error_code{errno, std::generic_category()};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue