diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-09-05 21:34:12 -0400 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-09-06 16:07:29 -0400 |
commit | e71cd2ed3850d6a21b06f42458ab9fa6abc023d6 (patch) | |
tree | f90a22f5091fbf0adff2fb2f212ddf966c2c9d60 /pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch | |
parent | dba6d77ad232e3a5ffc5e281ebbada4fe0e23981 (diff) | |
download | nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.tar nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.tar.gz nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.tar.bz2 nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.tar.lz nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.tar.xz nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.tar.zst nixpkgs-e71cd2ed3850d6a21b06f42458ab9fa6abc023d6.zip |
SDL2_mixer_2_0: fix build with clang 16
Backport patches to fix incompatible pointer conversion errors.
Diffstat (limited to 'pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch')
-rw-r--r-- | pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch b/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch new file mode 100644 index 00000000000..76fff3fa63e --- /dev/null +++ b/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch @@ -0,0 +1,26 @@ +--- a/music_mpg123.c 2018-10-31 10:59:00.000000000 -0400 ++++ b/music_mpg123.c 2023-09-05 21:31:51.529191521 -0400 +@@ -48,7 +48,11 @@ + int (*mpg123_open_handle)(mpg123_handle *mh, void *iohandle); + const char* (*mpg123_plain_strerror)(int errcode); + void (*mpg123_rates)(const long **list, size_t *number); ++#if (MPG123_API_VERSION >= 45) /* api (but not abi) change as of mpg123-1.26.0 */ ++ int (*mpg123_read)(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done ); ++#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*) ); + off_t (*mpg123_seek)( mpg123_handle *mh, off_t sampleoff, int whence ); + const char* (*mpg123_strerror)(mpg123_handle *mh); +@@ -95,7 +99,11 @@ + FUNCTION_LOADER(mpg123_open_handle, int (*)(mpg123_handle *mh, void *iohandle)) + FUNCTION_LOADER(mpg123_plain_strerror, const char* (*)(int errcode)) + FUNCTION_LOADER(mpg123_rates, void (*)(const long **list, size_t *number)); ++#if (MPG123_API_VERSION >= 45) /* api (but not abi) change as of mpg123-1.26.0 */ ++ FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done )) ++#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_seek, off_t (*)( mpg123_handle *mh, off_t sampleoff, int whence )) + FUNCTION_LOADER(mpg123_strerror, const char* (*)(mpg123_handle *mh)) |