Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
@@ -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)
@@ -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 */