headers: Don't use the 'inline' attribute on Clang when targeting C89 Move the defined(__clang__) into the condition next to __MINGW_GNUC_PREREQ(4, 3) (which doesn't trigger for clang, as clang presents itself as GCC 4.2). This fixes building with Clang in C89 mode where we can't use the 'inline' attribute as such, but need to use __inline__ instead. (This doesn't trigger when building without optimizations, because __NO_INLINE__ is defined in those cases.) Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in index c1caae6..01eff66 100644 --- a/mingw-w64-headers/crt/_mingw.h.in +++ b/mingw-w64-headers/crt/_mingw.h.in
@@ -86,8 +86,7 @@ #elif defined(_MSC_VER) # define __CRT_INLINE __inline #else -# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) \ - || (defined (__clang__)) +# if ((__MINGW_GNUC_PREREQ(4, 3) || defined(__clang__)) && __STDC_VERSION__ >= 199901L) # define __CRT_INLINE extern inline __attribute__((__gnu_inline__)) # else # define __CRT_INLINE extern __inline__