--- src/mongo/util/processinfo_linux.cpp.orig 2015-12-14 14:47:03.364085899 +0100 +++ src/mongo/util/processinfo_linux.cpp 2015-12-14 14:49:57.772093896 +0100 @@ -35,7 +35,7 @@ #include #include #include -#ifdef __UCLIBC__ +#ifndef __GLIBC__ #include #else #include @@ -424,12 +424,14 @@ double ProcessInfo::getSystemMemoryPress } void ProcessInfo::getExtraInfo(BSONObjBuilder& info) { +#if defined(__GLIBC__) // [dm] i don't think mallinfo works. (64 bit.) ?? struct mallinfo malloc_info = mallinfo(); // structure has same name as function that returns it. (see malloc.h) info.append("heap_usage_bytes", malloc_info.uordblks /*main arena*/ + malloc_info.hblkhd /*mmap blocks*/); // docs claim hblkhd is included in uordblks but it isn't +#endif LinuxProc p(_pid); if (p._maj_flt <= std::numeric_limits::max()) @@ -467,11 +469,11 @@ void ProcessInfo::SystemInfo::collectSys BSONObjBuilder bExtra; bExtra.append("versionString", LinuxSysHelper::readLineFromFile("/proc/version")); -#ifdef __UCLIBC__ +#if defined(__UCLIBC__) stringstream ss; ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__; bExtra.append("libcVersion", ss.str()); -#else +#elif defined(__GLIBC__) bExtra.append("libcVersion", gnu_get_libc_version()); #endif if (!verSig.empty())