cmake: android support

Foundation/src/Error.cpp: ndk-r9 define _GNU_SOURCE in features.h but only the XSI-compliant strerror_r in string.h
This commit is contained in:
Csaba Keszegh
2013-11-01 16:46:20 +01:00
parent 5edb90c48e
commit 8b3561a525
3 changed files with 13 additions and 5 deletions

View File

@@ -75,10 +75,10 @@ namespace Poco {
without -D_GNU_SOURCE is needed, otherwise the GNU version is
preferred.
*/
#ifdef _GNU_SOURCE
#if defined _GNU_SOURCE && !POCO_ANDROID
char errmsg[256] = "";
return std::string(strerror_r(errorCode, errmsg, 256));
#elif (_XOPEN_SOURCE >= 600)
#elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
char errmsg[256] = "";
strerror_r(errorCode, errmsg, 256);
return errmsg;