From e9fc4ac0955744eaa49ef8c474d8c17e4edd5e4c Mon Sep 17 00:00:00 2001 From: osx2000 Date: Fri, 11 Nov 2016 14:27:07 +0100 Subject: [PATCH 1/2] Fully qualified std::this_thread::yield() --- include/spdlog/details/async_log_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/async_log_helper.h b/include/spdlog/details/async_log_helper.h index fdb1dc5c..7b537361 100644 --- a/include/spdlog/details/async_log_helper.h +++ b/include/spdlog/details/async_log_helper.h @@ -359,7 +359,7 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_ // yield upto 150 micros if (time_since_op <= microseconds(100)) - return yield(); + return std::this_thread::yield(); // sleep for 20 ms upto 200 ms From 3cd497ee95771502f1ff045c65a57d18df3c6b1b Mon Sep 17 00:00:00 2001 From: osx2000 Date: Fri, 11 Nov 2016 14:28:45 +0100 Subject: [PATCH 2/2] extended conditional compilation to __SUNPRO_CC --- 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 86efa0dc..d468ff45 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -343,7 +343,7 @@ inline std::string errno_str(int err_num) else return "Unkown error"; -#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || \ +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || defined(__SUNPRO_CC) || \ ((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version if (strerror_r(err_num, buf, buf_size) == 0)