From edbea633f3d7144f115e40b7abcb4bcedd906d21 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 30 May 2012 11:08:11 +0100 Subject: [PATCH] Merge a tweak from Tat to keep Mac 10.5 from crashing on realpath --- simgear/misc/sg_path.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.5