Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSupSuper2023-12-01 10:34:02 +0000
committerMartin Hořeňovský2023-12-02 22:03:48 +0100
commit4a7be16c8ca0a121853962b9298e38252afbd0c8 (patch)
tree2e682b7f40afa92ff5206659d68d3d52c0437186
parent32d9ae24bc4a0fed9a136a73e116b4ded0ac84b7 (diff)
downloadcatch3-4a7be16c8ca0a121853962b9298e38252afbd0c8.tar.gz
Fix compilation on Xbox platforms
Xbox does not support getenv
-rw-r--r--src/catch2/internal/catch_compiler_capabilities.hpp4
1 files changed, 3 insertions, 1 deletions
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