From 773d97a95c76b5cb33bf054b72ee8164a14f3053 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 22 May 2023 14:48:55 +1000 Subject: [PATCH] Fix a compilation error with VC6 and VS2003. These compilers do not support noinline. --- miniaudio.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 3f2dfdb1..a0f177ae 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -3914,7 +3914,13 @@ typedef ma_uint16 wchar_t; #ifdef _MSC_VER #define MA_INLINE __forceinline - #define MA_NO_INLINE __declspec(noinline) + + /* noinline was introduced in Visual Studio 2005. */ + #if _MSC_VER >= 1400 + #define MA_NO_INLINE __declspec(noinline) + #else + #define MA_NO_INLINE + #endif #elif defined(__GNUC__) /* I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when