diff --git a/include/crt/_mingw.h b/include/crt/_mingw.h index 3896fd1e99d..26757379ce6 100644 --- a/include/crt/_mingw.h +++ b/include/crt/_mingw.h @@ -135,6 +135,14 @@ /* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW. This will allow GCC to optimize away some EH unwind code, at least in DW2 case. */ +#ifndef __MINGW_EXTENSION +#if defined(__GNUC__) || defined(__GNUG__) +#define __MINGW_EXTENSION __extension__ +#else +#define __MINGW_EXTENSION +#endif +#endif + #ifndef __MSVCRT_VERSION__ /* High byte is the major version, low byte is the minor. */ # define __MSVCRT_VERSION__ 0x0700