From 1ac68e399a8d4812481be5cd007ee44675ce9a83 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 18 Jul 2016 22:29:26 +0300 Subject: [PATCH] Fixed issue #245 --- include/spdlog/details/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index 8c50907b..4356d703 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -264,7 +264,7 @@ inline std::string errno_str(int err_num) else return "Unkown error"; -#elif (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE // posix version +#elif defined(__APPLE__) || ((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version if (strerror_r(err_num, buf, buf_size) == 0) return std::string(buf); else