this also needs -D_FILE_OFFSET_BITS=64, but for musl specifically that doesn't matter -- diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index a700e68..c8327b9 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -1488,17 +1488,10 @@ static u32 RecursiveFindFiles(const char* OriginPath, const char* ParentPath, co FILESYSTEM_FIND_DATA outData; outData.Attributes = 0; -#if defined(__HAIKU__) || defined(__APPLE__) || defined(__FreeBSD__) struct stat sDir; if (stat(full_path.c_str(), &sDir) < 0) continue; -#else - struct stat64 sDir; - if (stat64(full_path.c_str(), &sDir) < 0) - continue; -#endif - if (S_ISDIR(sDir.st_mode)) { if (Flags & FILESYSTEM_FIND_RECURSIVE) @@ -1601,13 +1594,8 @@ bool FileSystem::StatFile(const char* path, FILESYSTEM_STAT_DATA* sd) return false; // stat file -#if defined(__HAIKU__) || defined(__APPLE__) || defined(__FreeBSD__) struct stat sysStatData; if (stat(path, &sysStatData) < 0) -#else - struct stat64 sysStatData; - if (stat64(path, &sysStatData) < 0) -#endif return false; // parse attributes @@ -1634,13 +1622,8 @@ bool FileSystem::StatFile(std::FILE* fp, FILESYSTEM_STAT_DATA* sd) return false; // stat file -#if defined(__HAIKU__) || defined(__APPLE__) || defined(__FreeBSD__) struct stat sysStatData; if (fstat(fd, &sysStatData) < 0) -#else - struct stat64 sysStatData; - if (fstat64(fd, &sysStatData) < 0) -#endif return false; // parse attributes @@ -1667,13 +1650,8 @@ bool FileSystem::FileExists(const char* path) return false; // stat file -#if defined(__HAIKU__) || defined(__APPLE__) || defined(__FreeBSD__) struct stat sysStatData; if (stat(path, &sysStatData) < 0) -#else - struct stat64 sysStatData; - if (stat64(path, &sysStatData) < 0) -#endif return false; if (S_ISDIR(sysStatData.st_mode)) @@ -1689,13 +1667,8 @@ bool FileSystem::DirectoryExists(const char* path) return false; // stat file -#if defined(__HAIKU__) || defined(__APPLE__) || defined(__FreeBSD__) struct stat sysStatData; if (stat(path, &sysStatData) < 0) -#else - struct stat64 sysStatData; - if (stat64(path, &sysStatData) < 0) -#endif return false; if (S_ISDIR(sysStatData.st_mode)) diff --git a/common/Linux/LnxHostSys.cpp b/common/Linux/LnxHostSys.cpp index 5b63cda..2ed3d81 100644 --- a/common/Linux/LnxHostSys.cpp +++ b/common/Linux/LnxHostSys.cpp @@ -243,12 +243,7 @@ void* HostSys::CreateSharedMemory(const char* name, size_t size) // we're not going to be opening this mapping in other processes, so remove the file shm_unlink(name); - // ensure it's the correct size -#if !defined(__APPLE__) && !defined(__FreeBSD__) - if (ftruncate64(fd, static_cast(size)) < 0) -#else if (ftruncate(fd, static_cast(size)) < 0) -#endif { std::fprintf(stderr, "ftruncate64(%zu) failed: %d\n", size, errno); return nullptr; diff --git a/pcsx2/Linux/LnxFlatFileReader.cpp b/pcsx2/Linux/LnxFlatFileReader.cpp index 2ecc9f2..dd1f045 100644 --- a/pcsx2/Linux/LnxFlatFileReader.cpp +++ b/pcsx2/Linux/LnxFlatFileReader.cpp @@ -100,15 +100,9 @@ void FlatFileReader::Close(void) uint FlatFileReader::GetBlockCount(void) const { -#if defined(__HAIKU__) || defined(__APPLE__) || defined(__FreeBSD__) struct stat sysStatData; if (fstat(m_fd, &sysStatData) < 0) return 0; -#else - struct stat64 sysStatData; - if (fstat64(m_fd, &sysStatData) < 0) - return 0; -#endif return (int)(sysStatData.st_size / m_blocksize); }