mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-26 01:36:18 +02:00
use strerror_r on Darwin
This commit is contained in:
parent
3b49520d63
commit
f18b7210f4
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user