From 5ffc6ceb5581c80bc64f8d1b5287796ece06c386 Mon Sep 17 00:00:00 2001 From: Vitaly Orekhov Date: Mon, 7 Jul 2025 15:24:27 +0300 Subject: [PATCH] [PSEH] Guard SEH2 macros for Clang on Linux x64 builders (#8194) Hackfixing a corner case detected via broken entities of wlanwiz due to its usage of STLport. This was already done to PSEH3 prior to me. Corner case examples: - broken: https://github.com/SigmaTel71/reactos/actions/runs/15911239148 - "fixed": https://github.com/SigmaTel71/reactos/actions/runs/15945705635 Guard SEH2 family macros behind #ifndef. CORE-6622 CORE-6905 --- sdk/lib/pseh/include/pseh/pseh2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/lib/pseh/include/pseh/pseh2.h b/sdk/lib/pseh/include/pseh/pseh2.h index a3aed7aed2b..d8f2bd9774e 100644 --- a/sdk/lib/pseh/include/pseh/pseh2.h +++ b/sdk/lib/pseh/include/pseh/pseh2.h @@ -88,11 +88,13 @@ _Pragma("GCC diagnostic pop") #define _SEH2_LEAVE goto __seh2_scope_end__; #define _SEH2_VOLATILE volatile +#ifndef __try // Conflict with GCC's x64 Linux STL, affects Clang on Linux x64 compilation as well #define __try _SEH2_TRY #define __except _SEH2_EXCEPT #define __finally _SEH2_FINALLY #define __endtry _SEH2_END #define __leave _SEH2_LEAVE +#endif #define _exception_code() 0 #define _exception_info() ((void*)0)