blob: cfbcbd9aa27a32638d1aafa0f562e41692076e14 [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>
Andrew Geissler220dafd2023-10-04 10:18:08 -05008
9Upstream-Status: Pending
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010---
Brad Bishop0a921262019-09-24 07:40:45 -040011 src/mongo/util/processinfo_linux.cpp | 8 ++++----
12 1 file changed, 4 insertions(+), 4 deletions(-)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013
Brad Bishop0a921262019-09-24 07:40:45 -040014diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
Andrew Geisslerd688a012020-09-18 13:36:00 -050015index a968c54727..0d8b8874e2 100644
Brad Bishop0a921262019-09-24 07:40:45 -040016--- a/src/mongo/util/processinfo_linux.cpp
17+++ b/src/mongo/util/processinfo_linux.cpp
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018@@ -44,10 +44,10 @@
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019 #include <unistd.h>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020 #ifdef __BIONIC__
21 #include <android/api-level.h>
22-#elif __UCLIBC__
23-#include <features.h>
24-#else
25+#elif defined(__GLIBC__) && !defined(__UCLIBC__)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026 #include <gnu/libc-version.h>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027+#else
28+#include <features.h>
29 #endif
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031 #include <boost/filesystem.hpp>
Andrew Geisslerd688a012020-09-18 13:36:00 -050032@@ -617,7 +617,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
Brad Bishop0a921262019-09-24 07:40:45 -040033 std::stringstream ss;
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034 ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
35 bExtra.append("libcVersion", ss.str());
36-#else
37+#elif defined(__GLIBC__)
38 bExtra.append("libcVersion", gnu_get_libc_version());
39 #endif
40 if (!verSig.empty())
Brad Bishop0a921262019-09-24 07:40:45 -040041--
Andrew Geisslerd688a012020-09-18 13:36:00 -0500422.24.0
Brad Bishop0a921262019-09-24 07:40:45 -040043