Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 1 | From 6332823f9fdcb571305b716330e67d0b38810868 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 2 | From: Vincent Prince <vincent.prince.fr@gmail.com> |
| 3 | Date: Mon, 16 Sep 2019 13:30:13 +0200 |
| 4 | Subject: [PATCH 03/10] Use __GLIBC__ to control use of gnu_get_libc_version |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | |
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 7 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 8 | --- |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 9 | src/mongo/util/processinfo_linux.cpp | 8 ++++---- |
| 10 | 1 file changed, 4 insertions(+), 4 deletions(-) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 12 | diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 13 | index a968c54727..0d8b8874e2 100644 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 14 | --- a/src/mongo/util/processinfo_linux.cpp |
| 15 | +++ b/src/mongo/util/processinfo_linux.cpp |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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> |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 30 | @@ -617,7 +617,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() { |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 31 | std::stringstream ss; |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 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()) |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 39 | -- |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 40 | 2.24.0 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 41 | |