mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 18:22:59 +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
|
without -D_GNU_SOURCE is needed, otherwise the GNU version is
|
||||||
preferred.
|
preferred.
|
||||||
*/
|
*/
|
||||||
#if defined _GNU_SOURCE && !POCO_ANDROID
|
#if (_XOPEN_SOURCE >= 600) || POCO_ANDROID
|
||||||
char errmsg[256] = "";
|
|
||||||
return std::string(strerror_r(errorCode, errmsg, 256));
|
|
||||||
#elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
|
|
||||||
char errmsg[256] = "";
|
char errmsg[256] = "";
|
||||||
strerror_r(errorCode, errmsg, 256);
|
strerror_r(errorCode, errmsg, 256);
|
||||||
return errmsg;
|
return errmsg;
|
||||||
|
#elif defined _GNU_SOURCE
|
||||||
|
char errmsg[256] = "";
|
||||||
|
return std::string(strerror_r(errorCode, errmsg, 256));
|
||||||
#else
|
#else
|
||||||
return std::string(strerror(errorCode));
|
return std::string(strerror(errorCode));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user