aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
blob: c17ebf1e7eaa71db0e371ceaabde1a1c8030c4e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 3eed8388b49d5d3cbc2db74fee1b017eb4b40d0a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Sep 2017 10:06:24 -0700
Subject: [PATCH] Use __GLIBC__ to control use of gnu_get_libc_version

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
 src/mongo/util/processinfo_linux.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: git/src/mongo/util/processinfo_linux.cpp
===================================================================
--- git.orig/src/mongo/util/processinfo_linux.cpp
+++ git/src/mongo/util/processinfo_linux.cpp
@@ -44,10 +44,10 @@
 #include <unistd.h>
 #ifdef __BIONIC__
 #include <android/api-level.h>
-#elif __UCLIBC__
-#include <features.h>
-#else
+#elif defined(__GLIBC__) && !defined(__UCLIBC__)
 #include <gnu/libc-version.h>
+#else
+#include <features.h>
 #endif
 
 #include <boost/filesystem.hpp>
@@ -503,7 +503,7 @@ void ProcessInfo::SystemInfo::collectSys
     stringstream ss;
     ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
     bExtra.append("libcVersion", ss.str());
-#else
+#elif defined(__GLIBC__)
     bExtra.append("libcVersion", gnu_get_libc_version());
 #endif
     if (!verSig.empty())