From 2a19a091b132f2c8b5e1899be22bd2731f731631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81re=CC=81mie=20Dumas?= Date: Sat, 15 Nov 2025 08:31:41 -0800 Subject: [PATCH] Fix UWP detection. --- include/spdlog/details/os-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);