From 4a51fffa97631ac9e83b23ed4c61214597b9ff38 Mon Sep 17 00:00:00 2001 From: comex Date: Fri, 8 Aug 2025 14:13:04 -0700 Subject: [PATCH] haze: fix duplicate-macro warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit haze was including both `` and `vapours/types.hpp` which both define `R_SUCCEEDED` and `R_FAILED`, producing compiler warnings. The intent is that `vapours/types.hpp` only gets included when targeting not-Switch and/or not-EL0. But the check didn't account for Troposphère. Fix that. --- libvapours/include/vapours/includes.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libvapours/include/vapours/includes.hpp b/libvapours/include/vapours/includes.hpp index 94a73b94..8034710b 100644 --- a/libvapours/include/vapours/includes.hpp +++ b/libvapours/include/vapours/includes.hpp @@ -44,8 +44,9 @@ #include #include -/* Stratosphere wants additional libstdc++ headers, others do not. */ -#ifdef ATMOSPHERE_IS_STRATOSPHERE +/* Stratosphere/Troposphere want additional libstdc++ headers and libnx, + * others do not. */ +#if defined(ATMOSPHERE_IS_STRATOSPHERE) || defined(ATMOSPHERE_IS_TROPOSPHERE) #include #include @@ -71,7 +72,7 @@ /* Non-EL0 code can't include libnx. */ #include "types.hpp" -#endif /* ATMOSPHERE_IS_STRATOSPHERE */ +#endif /* defined(ATMOSPHERE_IS_STRATOSPHERE) || defined(ATMOSPHERE_IS_TROPOSPHERE) */ /* Atmosphere meta. */ #include