mirror of https://github.com/OpenTTD/OpenTTD
(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)release/0.6
parent
5fcbb8f59b
commit
7162b8ddb3
|
@ -67,6 +67,10 @@ bool FiosGetDiskFreeSpace(const char *path, uint32 *tot)
|
||||||
uint32 free = 0;
|
uint32 free = 0;
|
||||||
|
|
||||||
#ifdef HAS_STATVFS
|
#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;
|
struct statvfs s;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue