]> git.mxchange.org Git - simgear.git/commitdiff
Fix platform check for strerror_r on Mac
authorJames Turner <zakalawe@mac.com>
Tue, 10 May 2016 18:47:25 +0000 (20:47 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/misc/strutils.cxx

index 7a2ffa30dff43a7e6251b603e4a3e7824bc9862d..8e7562d1dd985dbe1b4ce1b16e0a65a92c7fc9e7 100644 (file)
@@ -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));