diff --git a/src/codecs/minimp3/minimp3_ex.h b/src/codecs/minimp3/minimp3_ex.h
index ee7ddf31..1bd8dcea 100644
--- a/src/codecs/minimp3/minimp3_ex.h
+++ b/src/codecs/minimp3/minimp3_ex.h
@@ -6,6 +6,7 @@
This software is distributed without any warranty.
See .
*/
+#include
#include "minimp3.h"
/* flags for mp3dec_ex_open_* functions */
@@ -128,8 +129,10 @@ int mp3dec_ex_open_w(mp3dec_ex_t *dec, const wchar_t *file_name, int flags);
#endif
#endif /*MINIMP3_EXT_H*/
-#ifdef MINIMP3_IMPLEMENTATION
+#if defined(MINIMP3_IMPLEMENTATION) && !defined(_MINIMP3_EX_IMPLEMENTATION_GUARD)
+#define _MINIMP3_EX_IMPLEMENTATION_GUARD
#include
+#include "minimp3.h"
static void mp3dec_skip_id3v1(const uint8_t *buf, size_t *pbuf_size)
{
@@ -1391,4 +1394,4 @@ void mp3dec_ex_close(mp3dec_ex_t *dec)
}
#endif
-#endif /*MINIMP3_IMPLEMENTATION*/
+#endif /* MINIMP3_IMPLEMENTATION && !_MINIMP3_EX_IMPLEMENTATION_GUARD */