diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index edbbd5c2..3b116830 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -567,7 +567,7 @@ SPDLOG_INLINE filename_t dir_name(const filename_t &path) { #pragma warning(disable : 4996) #endif // _MSC_VER std::string SPDLOG_INLINE getenv(const char *field) { -#if defined(_MSC_VER) && defined(__cplusplus_winrt) +#if defined(_MSC_VER) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) return std::string{}; // not supported under uwp #else char *buf = std::getenv(field);