From 7162b8ddb3dc479cedb1e27e0390c97c7e3a1fc2 Mon Sep 17 00:00:00 2001 From: bjarni Date: Fri, 30 Nov 2007 14:42:16 +0000 Subject: (svn r11541) -Fix: [OSX] detect statvfs at runtime (based on OSX version) instead of compile time This should prevent a crash on OSX 10.3 with the precompiled binaries (in the load/save windows) --- src/unix.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unix.cpp b/src/unix.cpp index aa9a361eb..0dc98d63c 100644 --- a/src/unix.cpp +++ b/src/unix.cpp @@ -67,6 +67,10 @@ bool FiosGetDiskFreeSpace(const char *path, uint32 *tot) uint32 free = 0; #ifdef HAS_STATVFS +# ifdef __APPLE__ + /* OSX 10.3 lacks statvfs so don't try to use it even though later versions of OSX has it. */ + if (MacOSVersionIsAtLeast(10, 4, 0)) +# endif { struct statvfs s; -- cgit v1.2.3-54-g00ecf