Fix compilation on Android.

This commit is contained in:
Hugh Wang 2016-09-13 10:19:26 +08:00
parent 59bf37f769
commit f2c9692438

View File

@ -342,7 +342,9 @@ inline std::string errno_str(int err_num)
else
return "Unkown error";
#elif defined(__FreeBSD__) || defined(__APPLE__) || ((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || \
((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version
if (strerror_r(err_num, buf, buf_size) == 0)
return std::string(buf);
else
@ -356,5 +358,3 @@ inline std::string errno_str(int err_num)
} //os
} //details
} //spdlog