blob: 8d82be1b5738b99f3e84f7fed12b946b8de760fb [file] [log] [blame]
Andrew Geisslerd688a012020-09-18 13:36:00 -05001From 6332823f9fdcb571305b716330e67d0b38810868 Mon Sep 17 00:00:00 2001
Brad Bishop0a921262019-09-24 07:40:45 -04002From: 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
Andrew Geisslerd688a012020-09-18 13:36:00 -050013index a968c54727..0d8b8874e2 100644
Brad Bishop0a921262019-09-24 07:40:45 -040014--- 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>
Andrew Geisslerd688a012020-09-18 13:36:00 -050030@@ -617,7 +617,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
Brad Bishop0a921262019-09-24 07:40:45 -040031 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--
Andrew Geisslerd688a012020-09-18 13:36:00 -0500402.24.0
Brad Bishop0a921262019-09-24 07:40:45 -040041