File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -663,6 +663,15 @@ if(yyjson_FOUND)
663663 target_link_libraries (libfastfetch PRIVATE yyjson)
664664endif ()
665665
666+ if (LINUX AND EXISTS "/lib/ld-musl-x86_64.so.1" )
667+ execute_process (COMMAND "/lib/ld-musl-x86_64.so.1"
668+ ERROR_VARIABLE LD_MUSL_VERSION)
669+ string (REGEX MATCH "[0-9]+\\ .[0-9]+\\ .[0-9]+" LD_MUSL_VERSION "${LD_MUSL_VERSION} " )
670+ if (NOT LD_MUSL_VERSION STREQUAL "" )
671+ target_compile_definitions (libfastfetch PUBLIC FF_MUSL_VERSION="${LD_MUSL_VERSION} " )
672+ endif ()
673+ endif ()
674+
666675target_compile_definitions (libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__=1)
667676if (WIN32 )
668677 target_compile_definitions (libfastfetch PUBLIC WIN32_LEAN_AND_MEAN=1)
Original file line number Diff line number Diff line change 77
88const char * ffDetectLibc (FFLibcResult * result )
99{
10- #ifdef __GNU_LIBRARY__
10+ #ifdef __UCLIBC__
11+ result -> name = "uClibc" ;
12+ result -> version = FF_STR (__UCLIBC_MAJOR__ ) "." FF_STR (__UCLIBC_MINOR__ ) "." FF_STR (__UCLIBC_SUBLEVEL__ );
13+ #elif defined(__GNU_LIBRARY__ )
1114 result -> name = "glibc" ;
1215 result -> version = FF_STR (__GLIBC__ ) "." FF_STR (__GLIBC_MINOR__ );
1316#else
1417 result -> name = "musl" ;
15- result -> version = NULL ;
18+ #ifdef FF_MUSL_VERSION
19+ result -> version = FF_MUSL_VERSION ;
20+ #else
21+ result -> version = NULL ;
22+ #endif
1623#endif
1724
1825 return NULL ;
You can’t perform that action at this time.
0 commit comments