From 580dfc862f0bba9afafee0da5c9948ae10c88c38 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Sat, 14 May 2022 22:54:40 -0400 Subject: [PATCH] Define `INLINE` based on the compiler. MSVC doesn't recognize `__attribute__`. --- project/lib/overrides/jpeg/jconfigint.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/project/lib/overrides/jpeg/jconfigint.h b/project/lib/overrides/jpeg/jconfigint.h index 98f5895a5..49bc2bc63 100644 --- a/project/lib/overrides/jpeg/jconfigint.h +++ b/project/lib/overrides/jpeg/jconfigint.h @@ -5,7 +5,13 @@ #undef inline /* How to obtain function inlining. */ -#define INLINE __inline__ __attribute__((always_inline)) +#if defined(__has_attribute) +#define INLINE __inline__ __attribute__((always_inline)) +#elif defined(_MSC_VER) +#define INLINE __forceinline +#else +#define INLINE +#endif /* How to obtain thread-local storage */ #define THREAD_LOCAL __thread