mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-30 12:16:18 +00:00
fuck macos
This commit is contained in:
@@ -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()};
|
||||||
|
|||||||
Reference in New Issue
Block a user