diff --git a/inc/eficompiler.h b/inc/eficompiler.h index bf3643b..6f6ff7d 100644 --- a/inc/eficompiler.h +++ b/inc/eficompiler.h @@ -48,6 +48,12 @@ Abstract: #define ALIGN(x) EFI_ALIGN(x) #endif +#ifdef _MSC_EXTENSIONS +#define EFI_NORETURN __declspec(noreturn) +#else +#define EFI_NORETURN __attribute__((noreturn)) +#endif + /* Also add a catch-all on __attribute__() for MS compilers */ #ifdef _MSC_EXTENSIONS #define __attribute__(x) diff --git a/inc/efisetjmp.h b/inc/efisetjmp.h index de69194..4037688 100644 --- a/inc/efisetjmp.h +++ b/inc/efisetjmp.h @@ -5,6 +5,6 @@ #include "efisetjmp_arch.h" extern UINTN setjmp(jmp_buf env) __attribute__((returns_twice)); -extern VOID longjmp(jmp_buf env, UINTN value) __attribute__((noreturn)); +extern VOID longjmp(jmp_buf env, UINTN value) EFI_NORETURN; #endif /* GNU_EFI_SETJMP_H */