https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e581123c357633c0a199007a393ade028f189997

commit e581123c357633c0a199007a393ade028f189997
Author:     Hervé Poussineau <[email protected]>
AuthorDate: Tue Jan 5 19:22:21 2021 +0100
Commit:     Hervé Poussineau <[email protected]>
CommitDate: Tue Jan 5 19:24:23 2021 +0100

    [NTOSKRNL] Correctly use SEH2 macros (fixes GCC x64 compilation)
---
 ntoskrnl/ke/amd64/stubs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ntoskrnl/ke/amd64/stubs.c b/ntoskrnl/ke/amd64/stubs.c
index c99a0efcfac..08076199d56 100644
--- a/ntoskrnl/ke/amd64/stubs.c
+++ b/ntoskrnl/ke/amd64/stubs.c
@@ -330,6 +330,7 @@ KiSystemCallHandler(
         {
             GdiBatchCount = 0;
         }
+        _SEH2_END;
 
         /* Flush batch, if there are entries */
         if (GdiBatchCount != 0)
@@ -363,7 +364,7 @@ KiSystemCallHandler(
     /* Get stack bytes and calculate argument count */
     Count = DescriptorTable->Number[ServiceNumber] / 8;
 
-    __try
+    _SEH2_TRY
     {
         switch (Count)
         {
@@ -391,12 +392,12 @@ KiSystemCallHandler(
                 break;
         }
     }
-    __except(1)
+    _SEH2_EXCEPT(1)
     {
         TrapFrame->Rax = _SEH2_GetExceptionCode();
         return (PVOID)NtSyscallFailure;
     }
-
+    _SEH2_END;
 
     return (PVOID)DescriptorTable->Base[ServiceNumber];
 }

Reply via email to