summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-08-17 20:57:43 +0800
committerErik Kundiman <erik@megapahit.org>2023-08-17 20:57:43 +0800
commiteadd80cf95cc25565a3bdcea179503d21ba5ae11 (patch)
tree66208bca51f01c98a373f72cca1f68bc47229bdb
parentf8eca3e75a9325a16c0900eadfc893d049819eab (diff)
GLibc related code is used only on a GNU system
-rw-r--r--indra/llcommon/llsys.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 8c4e0988fc..457ced7fae 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -82,7 +82,9 @@ using namespace llsd;
# include <sys/sysinfo.h>
# include <stdexcept>
const char MEMINFO_FILE[] = "/proc/meminfo";
+#ifdef __GNU__
# include <gnu/libc-version.h>
+#endif
#elif LL_FREEBSD
# include <sys/sysctl.h>
# include <sys/utsname.h>
@@ -353,6 +355,7 @@ LLOSInfo::LLOSInfo() :
boost::regex os_version_parse(OS_VERSION_MATCH_EXPRESSION);
boost::smatch matched;
+#ifdef __GNU__
std::string glibc_version(gnu_get_libc_version());
if ( ll_regex_match(glibc_version, matched, os_version_parse) )
{
@@ -411,6 +414,7 @@ LLOSInfo::LLOSInfo() :
{
LL_WARNS("AppInit") << "glibc version '" << glibc_version << "' cannot be parsed to three numbers; using all zeros" << LL_ENDL;
}
+#endif // __GNU__
#else