aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch')
-rw-r--r--vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch b/vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch
new file mode 100644
index 0000000..8cead24
--- /dev/null
+++ b/vcpkg/ports/sdl1-mixer/mpg123_ssize_t.patch
@@ -0,0 +1,41 @@
+diff --git a/dynamic_mp3.c b/dynamic_mp3.c
+index 7c3209f0..ba80ee7a 100644
+--- a/dynamic_mp3.c
++++ b/dynamic_mp3.c
+@@ -63,7 +63,7 @@ int Mix_InitMP3(void)
+ #else
+ FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done ))
+ #endif
+- FUNCTION_LOADER(mpg123_replace_reader_handle, int (*)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) ))
++ FUNCTION_LOADER(mpg123_replace_reader_handle, int (*)( mpg123_handle *mh, mpg123_ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) ))
+ FUNCTION_LOADER(mpg123_seek, off_t (*)( mpg123_handle *mh, off_t sampleoff, int whence ))
+ FUNCTION_LOADER(mpg123_strerror, const char* (*)(mpg123_handle *mh))
+ if (mpg123.mpg123_init() != MPG123_OK) {
+diff --git a/dynamic_mp3.h b/dynamic_mp3.h
+index 2e4c48af..ad63bf76 100644
+--- a/dynamic_mp3.h
++++ b/dynamic_mp3.h
+@@ -43,7 +43,7 @@ typedef struct {
+ #else
+ int (*mpg123_read)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done );
+ #endif
+- int (*mpg123_replace_reader_handle)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) );
++ int (*mpg123_replace_reader_handle)( mpg123_handle *mh, mpg123_ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) );
+ off_t (*mpg123_seek)( mpg123_handle *mh, off_t sampleoff, int whence );
+ const char* (*mpg123_strerror)(mpg123_handle *mh);
+ } mpg123_loader;
+diff --git a/music_mpg.c b/music_mpg.c
+index 531615a2..7d92c28b 100644
+--- a/music_mpg.c
++++ b/music_mpg.c
+@@ -67,8 +67,8 @@ mpg_err(mpg123_handle* mpg, int code)
+
+ /* we're gonna override mpg123's I/O with these wrappers for RWops */
+ static
+-ssize_t rwops_read(void* p, void* dst, size_t n) {
+- return (ssize_t)MP3_RWread((struct mp3file_t *)p, dst, 1, n);
++mpg123_ssize_t rwops_read(void* p, void* dst, size_t n) {
++ return (mpg123_ssize_t)MP3_RWread((struct mp3file_t *)p, dst, 1, n);
+ }
+
+ static