diff --git a/CMakeLists.txt b/CMakeLists.txt index b3ba75d..b8fc205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,3 +47,15 @@ if(DEFINED GEN_KEYVALUE) message(STATUS "USE GEN_KEYVALUE") add_executable(key_value key_value.cxx) endif() +if(UNIX) +execute_process( + COMMAND uname -a + OUTPUT_VARIABLE UNAME_OUT + OUTPUT_STRIP_TRAILING_WHITESPACE +) +if(UNAME_OUT MATCHES "alpine" OR UNAME_OUT MATCHES "Alpine") +message(STATUS "on musl static link") +target_link_libraries(filecomplete -static;-static-libstdc++) +endif() +endif() + diff --git a/filecomplete.cpp b/filecomplete.cpp index 596dbc6..669c3ff 100644 --- a/filecomplete.cpp +++ b/filecomplete.cpp @@ -826,9 +826,7 @@ void color_print(const char* text, const COLOR_TYPE color) } // Resets the text to default color printf("\033[0m"); -#if defined(IOS_ISH) fflush(stdout); -#endif #endif fc_unlock_print(); }