From 4237f52ee250c6b757ed3ff204a2e1a2636fc720 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. --- libraries/libvapours/include/vapours/includes.hpp | 7 ++++--- troposphere/haze/include/haze/common.hpp | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libraries/libvapours/include/vapours/includes.hpp b/libraries/libvapours/include/vapours/includes.hpp index 94a73b94f..8034710bf 100644 --- a/libraries/libvapours/include/vapours/includes.hpp +++ b/libraries/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 diff --git a/troposphere/haze/include/haze/common.hpp b/troposphere/haze/include/haze/common.hpp index 2859b0d50..e15ec99ce 100644 --- a/troposphere/haze/include/haze/common.hpp +++ b/troposphere/haze/include/haze/common.hpp @@ -15,7 +15,9 @@ */ #pragma once +#define ATMOSPHERE_IS_TROPOSPHERE #define ATMOSPHERE_OS_HORIZON +#define ATMOSPHERE_BOARD_NINTENDO_NX #define ATMOSPHERE_ARCH_ARM64 #define ATMOSPHERE_ARCH_ARM_V8A