We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3907 - [PATCH] make sure libmpg123 is recent enough
Summary: [PATCH] make sure libmpg123 is recent enough
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-22 09:05 UTC by Ozkan Sezer
Modified: 2017-10-22 17:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2017-10-22 09:05:48 UTC
The attached patch makes sure that we are building against
a recent-enough libmpg123:  mpg123_replace_reader_handle()
requires MPG123_API_VERSION >= 24.

diff --git a/music_mpg123.c b/music_mpg123.c
--- a/music_mpg123.c
+++ b/music_mpg123.c
@@ -32,6 +32,11 @@
 
 #include <mpg123.h>
 
+/* MPG123_API_VERSION >= 24 needed for mpg123_replace_reader_handle() */
+#if !defined(MPG123_API_VERSION) || (MPG123_API_VERSION-0 < 24)
+#error minimum required libmpg123 version is 1.12.0 (api version 24)
+#endif
+
 
 typedef struct {
     int loaded;
Comment 1 Sam Lantinga 2017-10-22 17:49:36 UTC
We actually want to catch this during configure rather than as an error at build time.

I've implemented that here:
https://hg.libsdl.org/SDL_mixer/rev/ab82b7aff1fd

Thanks!