From 152ccd591722369aaad2785083fb2ab789effbbe Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Fri, 2 Oct 2020 03:23:43 -0600 Subject: [PATCH] Fix stat64 failure on Apple Silicon: just use the (not deprecated on OS X) stat (which is 64-bit since 10.6 via linking trickery, and always 64-bit on 64-bit OSes). --- src/common/file_system.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp index 0b449a9ca..5e846705b 100644 --- a/src/common/file_system.cpp +++ b/src/common/file_system.cpp @@ -1250,7 +1250,7 @@ static u32 RecursiveFindFiles(const char* OriginPath, const char* ParentPath, co FILESYSTEM_FIND_DATA outData; outData.Attributes = 0; -#ifdef __HAIKU__ +#if defined (__HAIKU__) || defined (__APPLE__) struct stat sDir; if (stat(full_path, &sDir) < 0) continue; @@ -1347,7 +1347,7 @@ bool StatFile(const char* Path, FILESYSTEM_STAT_DATA* pStatData) return false; // stat file -#ifdef __HAIKU__ +#if defined (__HAIKU__) || defined (__APPLE__) struct stat sysStatData; if (stat(Path, &sysStatData) < 0) #else @@ -1381,7 +1381,7 @@ bool FileExists(const char* Path) return false; // stat file -#ifdef __HAIKU__ +#if defined (__HAIKU__) || defined (__APPLE__) struct stat sysStatData; if (stat(Path, &sysStatData) < 0) #else @@ -1403,7 +1403,7 @@ bool DirectoryExists(const char* Path) return false; // stat file -#ifdef __HAIKU__ +#if defined (__HAIKU__) || defined (__APPLE__) struct stat sysStatData; if (stat(Path, &sysStatData) < 0) #else