use strerror_r on Darwin

This commit is contained in:
Guenter Obiltschnig 2017-02-14 14:10:26 +01:00
parent 3b49520d63
commit f18b7210f4

View File

@ -66,7 +66,7 @@ namespace Poco {
without -D_GNU_SOURCE is needed, otherwise the GNU version is without -D_GNU_SOURCE is needed, otherwise the GNU version is
preferred. preferred.
*/ */
#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || POCO_ANDROID #if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || POCO_ANDROID || __APPLE__
char errmsg[256] = ""; char errmsg[256] = "";
int rc = strerror_r(errorCode, errmsg, 256); int rc = strerror_r(errorCode, errmsg, 256);
return rc == 0 ? std::string(errmsg) : std::string(); return rc == 0 ? std::string(errmsg) : std::string();