diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c index 79957cc89f..7b3dda70e0 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c @@ -330,11 +330,42 @@ void closelog (void) } +#ifdef __GNUC__ + +typedef +VOID +(EFIAPI *NoReturnFuncPtr)( + VOID + ) __attribute__((__noreturn__)); + + +STATIC +VOID +EFIAPI +NopFunction ( + VOID + ) +{ +} + + void exit (int e) { + NoReturnFuncPtr NoReturnFunc; + NoReturnFunc = (NoReturnFuncPtr) NopFunction; + + NoReturnFunc (); } +#else + +void exit (int e) +{ +} + +#endif + int fclose (FILE *f) { return 0;