A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix codecs in simulator builds on Windows

The mingw linker uses strlen() in some cases, and codeclib.c redefines it, that
leads to mingw runtime init to call into our strlen() and then ci->strlen() which
of course crashes. Apply the same fix as for malloc and friends: rename the symbol.

The codeclib.h include is necessary for normal builds.

Change-Id: Ifa85901a3e4a31cc0e10b4b905df348a239d5c99

+5 -2
+2 -1
lib/rbcodec/codecs/lib/codeclib.c
··· 100 100 return(x); 101 101 } 102 102 103 - size_t strlen(const char *s) 103 + #undef strlen 104 + size_t codec_strlen(const char *s) 104 105 { 105 106 return(ci->strlen(s)); 106 107 }
+2 -1
lib/rbcodec/codecs/lib/codeclib.h
··· 40 40 #define free(x) codec_free(x) 41 41 #undef alloca 42 42 #define alloca(x) __builtin_alloca(x) 43 + #define strlen(s) codec_strlen(s) 43 44 44 45 void* codec_malloc(size_t size); 45 46 void* codec_calloc(size_t nmemb, size_t size); ··· 51 52 int memcmp(const void *s1, const void *s2, size_t n); 52 53 void *memmove(void *s1, const void *s2, size_t n); 53 54 54 - size_t strlen(const char *s); 55 + size_t codec_strlen(const char *s); 55 56 char *strcpy(char *dest, const char *src); 56 57 char *strcat(char *dest, const char *src); 57 58
+1
lib/rbcodec/codecs/libasap/asap.c
··· 21 21 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 22 */ 23 23 24 + #include "codeclib.h" 24 25 #include "asap_internal.h" 25 26 26 27 static byte s_memory[65536];