From 86e71fbb462efce80e601db0807bca0887829836 Mon Sep 17 00:00:00 2001 From: taynpg Date: Mon, 17 Feb 2025 18:16:45 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=B7=BB=E5=8A=A0musl=E9=9D=99?= =?UTF-8?q?=E6=80=81=E7=BC=96=E8=AF=91=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 12 ++++++++++++ filecomplete.cpp | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) 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(); }