From 329f184004eca0baca34a1f4357213fb688aa4c9 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 22 May 2020 20:04:59 +1000 Subject: [PATCH] PulseAudio: Fix compilation errors with C89 and MA_NO_RUNTIME_LINKING. --- miniaudio.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 519b29c8..1474fe7e 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -18582,7 +18582,21 @@ When using compile time linking, each of our ma_* equivalents should use the sam reason for this is that it allow us to take advantage of proper type safety. */ #ifdef MA_NO_RUNTIME_LINKING + +/* pulseaudio.h marks some functions with "inline" which isn't always supported. Need to emulate it. */ +#if !defined(__cplusplus) + #if defined(__STRICT_ANSI__) + #if !defined(inline) + #define inline __inline__ __attribute__((always_inline)) + #define MA_INLINE_DEFINED + #endif + #endif +#endif #include +#if defined(MA_INLINE_DEFINED) + #undef inline + #undef MA_INLINE_DEFINED +#endif #define MA_PA_OK PA_OK #define MA_PA_ERR_ACCESS PA_ERR_ACCESS