From f2c969243863fad3ba1aed62c5d3acb5db48c84e Mon Sep 17 00:00:00 2001 From: Hugh Wang Date: Tue, 13 Sep 2016 10:19:26 +0800 Subject: [PATCH] Fix compilation on Android. --- include/spdlog/details/os.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index eb95e44a..ed4f45cd 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -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 - -