From 3fbac8e2b7867611a2136d127fb83da768c731bc Mon Sep 17 00:00:00 2001 From: JamesReynolds Date: Fri, 1 Jun 2018 11:51:08 +0100 Subject: [PATCH] Closes #717 Failure to compile to systems that don't have a valid definition of strerror_r. --- include/spdlog/details/os.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index a9246de2..08adca5d 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -397,6 +397,11 @@ inline std::string errno_to_string(char buf[256], int res) return "Unknown error"; } +inline std::string errno_to_string(char buf[256], const fmt::internal::Null<> &/*tag*/) +{ + return errno_to_string(buf, -1); +} + // Return errno string (thread safe) inline std::string errno_str(int err_num) {