Stub out some glibc-specific functions This allows support for alternative libcs like musl diff --git a/base/platform/linux/base_info_linux.cpp b/base/platform/linux/base_info_linux.cpp index 714d8dc..b70cc23 100644 --- a/base/platform/linux/base_info_linux.cpp +++ b/base/platform/linux/base_info_linux.cpp @@ -22,7 +22,7 @@ #include -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && defined(__GLIBC__) #include #endif // Q_OS_LINUX @@ -200,7 +200,7 @@ QString AutoUpdateKey() { } QString GetLibcName() { -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && defined(__GLIBC__) return "glibc"; #endif // Q_OS_LINUX @@ -208,7 +208,7 @@ QString GetLibcName() { } QString GetLibcVersion() { -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && defined(__GLIBC__) static const auto result = [&] { const auto version = QString::fromLatin1(gnu_get_libc_version()); return QVersionNumber::fromString(version).isNull() ? QString() : version;