mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
fix for GH #1501: Alpine 3.4 trouble with Foundation/src/Error.cpp
This commit is contained in:
@@ -66,13 +66,13 @@ namespace Poco {
|
||||
without -D_GNU_SOURCE is needed, otherwise the GNU version is
|
||||
preferred.
|
||||
*/
|
||||
#if defined _GNU_SOURCE && !POCO_ANDROID
|
||||
char errmsg[256] = "";
|
||||
return std::string(strerror_r(errorCode, errmsg, 256));
|
||||
#elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
|
||||
#if (_XOPEN_SOURCE >= 600) || POCO_ANDROID
|
||||
char errmsg[256] = "";
|
||||
strerror_r(errorCode, errmsg, 256);
|
||||
return errmsg;
|
||||
#elif defined _GNU_SOURCE
|
||||
char errmsg[256] = "";
|
||||
return std::string(strerror_r(errorCode, errmsg, 256));
|
||||
#else
|
||||
return std::string(strerror(errorCode));
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user