From 4a7be16c8ca0a121853962b9298e38252afbd0c8 Mon Sep 17 00:00:00 2001 From: SupSuper Date: Fri, 1 Dec 2023 10:34:02 +0000 Subject: [PATCH] Fix compilation on Xbox platforms Xbox does not support getenv --- src/catch2/internal/catch_compiler_capabilities.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index fc5d4f31..dacae01b 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -156,7 +156,9 @@ //////////////////////////////////////////////////////////////////////////////// // Assume that some platforms do not support getenv. -#if defined(CATCH_PLATFORM_WINDOWS_UWP) || defined(CATCH_PLATFORM_PLAYSTATION) +#if defined( CATCH_PLATFORM_WINDOWS_UWP ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( _GAMING_XBOX ) # define CATCH_INTERNAL_CONFIG_NO_GETENV #else # define CATCH_INTERNAL_CONFIG_GETENV