diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 449256d0..03e1f9a2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,6 +43,9 @@ if(UNIX) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") add_definitions(-DUNIX_LINUX) + if($ENV{USE_MUSL} STREQUAL "YES") + add_definitions(-DUNIX_LINUX_MUSL) + endif() endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") diff --git a/src/Mayaqua/Internat.c b/src/Mayaqua/Internat.c index 71f476f4..98f96100 100644 --- a/src/Mayaqua/Internat.c +++ b/src/Mayaqua/Internat.c @@ -789,11 +789,11 @@ void InitInternational() d = IconvWideToStrInternal(); if (d == (void *)-1) { -#ifdef UNIX_MACOS +#if defined (UNIX_MACOS) || defined (UNIX_LINUX_MUSL) StrCpy(charset, sizeof(charset), "utf-8"); -#else // UNIX_MACOS +#else // defined (UNIX_MACOS) || defined (UNIX_LINUX_MUSL) StrCpy(charset, sizeof(charset), "EUCJP"); -#endif // UNIX_MACOS +#endif // defined (UNIX_MACOS) || defined (UNIX_LINUX_MUSL) d = IconvWideToStrInternal(); if (d == (void *)-1) {