From: James Turner Date: Wed, 30 May 2012 10:08:11 +0000 (+0100) Subject: Merge a tweak from Tat to keep Mac 10.5 from crashing on realpath X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=edbea633f3d7144f115e40b7abcb4bcedd906d21;p=simgear.git Merge a tweak from Tat to keep Mac 10.5 from crashing on realpath --- diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index d51c93af..f46f7ac4 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -485,8 +485,11 @@ bool SGPath::rename(const SGPath& newName) std::string SGPath::realpath() const { -#ifdef _WIN32 +#if defined(_WIN32) || (defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED <= 1050) // Not implemented for Windows yet. Return original path instead. + + // Workaround for Mac OS 10.5. Somehow fgfs crashes on Mac at ::realpath. + // simply returning path works on Mac since absolute path is passed from the GUI launcher return path; #else char* buf = ::realpath(path.c_str(), NULL);