blob: d98fa56cbb6635ba18d62ae1150756f1024ffe08 [file] [log] [blame]
Brad Bishop0a921262019-09-24 07:40:45 -04001From d701ceeb15662038435b80ba556a80c17f76d2dc Mon Sep 17 00:00:00 2001
2From: Vincent Prince <vincent.prince.fr@gmail.com>
3Date: Mon, 16 Sep 2019 13:30:13 +0200
4Subject: [PATCH 03/10] Use __GLIBC__ to control use of gnu_get_libc_version
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishop0a921262019-09-24 07:40:45 -04007Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008---
Brad Bishop0a921262019-09-24 07:40:45 -04009 src/mongo/util/processinfo_linux.cpp | 8 ++++----
10 1 file changed, 4 insertions(+), 4 deletions(-)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011
Brad Bishop0a921262019-09-24 07:40:45 -040012diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
13index cccb91c..45c4b7d 100644
14--- a/src/mongo/util/processinfo_linux.cpp
15+++ b/src/mongo/util/processinfo_linux.cpp
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016@@ -44,10 +44,10 @@
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017 #include <unistd.h>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018 #ifdef __BIONIC__
19 #include <android/api-level.h>
20-#elif __UCLIBC__
21-#include <features.h>
22-#else
23+#elif defined(__GLIBC__) && !defined(__UCLIBC__)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024 #include <gnu/libc-version.h>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025+#else
26+#include <features.h>
27 #endif
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029 #include <boost/filesystem.hpp>
Brad Bishop0a921262019-09-24 07:40:45 -040030@@ -546,7 +546,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
31 std::stringstream ss;
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032 ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
33 bExtra.append("libcVersion", ss.str());
34-#else
35+#elif defined(__GLIBC__)
36 bExtra.append("libcVersion", gnu_get_libc_version());
37 #endif
38 if (!verSig.empty())
Brad Bishop0a921262019-09-24 07:40:45 -040039--
402.7.4
41