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> |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame^] | 8 | |
| 9 | Upstream-Status: Pending |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | --- |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 11 | src/mongo/util/processinfo_linux.cpp | 8 ++++---- |
| 12 | 1 file changed, 4 insertions(+), 4 deletions(-) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 13 | |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 14 | 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] | 15 | index a968c54727..0d8b8874e2 100644 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 16 | --- a/src/mongo/util/processinfo_linux.cpp |
| 17 | +++ b/src/mongo/util/processinfo_linux.cpp |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | @@ -44,10 +44,10 @@ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | #include <unistd.h> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | #ifdef __BIONIC__ |
| 21 | #include <android/api-level.h> |
| 22 | -#elif __UCLIBC__ |
| 23 | -#include <features.h> |
| 24 | -#else |
| 25 | +#elif defined(__GLIBC__) && !defined(__UCLIBC__) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 26 | #include <gnu/libc-version.h> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | +#else |
| 28 | +#include <features.h> |
| 29 | #endif |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 30 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | #include <boost/filesystem.hpp> |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 32 | @@ -617,7 +617,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() { |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 33 | std::stringstream ss; |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 34 | 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 Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 41 | -- |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 42 | 2.24.0 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 43 | |