Commit f2c96924 authored by Hugh Wang's avatar Hugh Wang

Fix compilation on Android.

parent 59bf37f7
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment