From cb6406361061578db779ada90624374f325bfbb9 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 10 May 2016 20:47:25 +0200 Subject: [PATCH] Fix platform check for strerror_r on Mac --- simgear/misc/strutils.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.39.5