Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From 3eed8388b49d5d3cbc2db74fee1b017eb4b40d0a Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 2 Sep 2017 10:06:24 -0700 |
| 4 | Subject: [PATCH] Use __GLIBC__ to control use of gnu_get_libc_version |
| 5 | |
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 7 | --- |
| 8 | Upstream-Status: Pending |
| 9 | src/mongo/util/processinfo_linux.cpp | 6 ++++-- |
| 10 | 1 file changed, 4 insertions(+), 2 deletions(-) |
| 11 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 12 | Index: 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 Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | #include <unistd.h> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 18 | #ifdef __BIONIC__ |
| 19 | #include <android/api-level.h> |
| 20 | -#elif __UCLIBC__ |
| 21 | -#include <features.h> |
| 22 | -#else |
| 23 | +#elif defined(__GLIBC__) && !defined(__UCLIBC__) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | #include <gnu/libc-version.h> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 25 | +#else |
| 26 | +#include <features.h> |
| 27 | #endif |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 28 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 29 | #include <boost/filesystem.hpp> |
| 30 | @@ -503,7 +503,7 @@ void ProcessInfo::SystemInfo::collectSys |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 31 | 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()) |