diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c89109c9..4f37bd18 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,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) {