mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
20 lines
361 B
C
20 lines
361 B
C
#include "libc.h"
|
|
|
|
#define FF_STR_INDIR(x) #x
|
|
#define FF_STR(x) FF_STR_INDIR(x)
|
|
|
|
#include <features.h>
|
|
|
|
const char* ffDetectLibc(FFLibcResult* result)
|
|
{
|
|
#ifdef __GNU_LIBRARY__
|
|
result->name = "glibc";
|
|
result->version = FF_STR(__GLIBC__) "." FF_STR(__GLIBC_MINOR__);
|
|
#else
|
|
result->name = "musl";
|
|
result->version = NULL;
|
|
#endif
|
|
|
|
return NULL;
|
|
}
|