From: James Turner Date: Tue, 10 May 2016 18:47:25 +0000 (+0200) Subject: Fix platform check for strerror_r on Mac X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb6406361061578db779ada90624374f325bfbb9;p=simgear.git Fix platform check for strerror_r on Mac --- diff --git a/simgear/misc/strutils.cxx b/simgear/misc/strutils.cxx index 7a2ffa30..8e7562d1 100644 --- a/simgear/misc/strutils.cxx +++ b/simgear/misc/strutils.cxx @@ -615,7 +615,7 @@ std::string error_string(int errnum) retcode = strerror_s(buf, sizeof(buf), errnum); #elif defined(_GNU_SOURCE) return std::string(strerror_r(errnum, buf, sizeof(buf))); -#elif _POSIX_C_SOURCE >= 200112L +#elif (_POSIX_C_SOURCE >= 200112L) || defined(SG_MAC) int retcode; // POSIX.1-2001 and POSIX.1-2008 retcode = strerror_r(errnum, buf, sizeof(buf));