blob: c17ebf1e7eaa71db0e371ceaabde1a1c8030c4e2 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 3eed8388b49d5d3cbc2db74fee1b017eb4b40d0a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Sep 2017 10:06:24 -0700
4Subject: [PATCH] Use __GLIBC__ to control use of gnu_get_libc_version
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9 src/mongo/util/processinfo_linux.cpp | 6 ++++--
10 1 file changed, 4 insertions(+), 2 deletions(-)
11
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012Index: git/src/mongo/util/processinfo_linux.cpp
13===================================================================
14--- git.orig/src/mongo/util/processinfo_linux.cpp
15+++ git/src/mongo/util/processinfo_linux.cpp
16@@ -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>
30@@ -503,7 +503,7 @@ void ProcessInfo::SystemInfo::collectSys
Brad Bishopd7bf8c12018-02-25 22:55:05 -050031 stringstream ss;
32 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())