blob: 0334d994e472fcc9cb7dbee152355a6c35afef60 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From a4dfc92ff342e59596ab64267a8d4f22f173c23b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Sep 2017 12:40:41 -0700
4Subject: [PATCH 1/4] Use strerror_r only on glibc systems
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 src/mongo/util/log.cpp | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp
12index 1957eb4791..ddf3908818 100644
13--- a/src/mongo/util/log.cpp
14+++ b/src/mongo/util/log.cpp
15@@ -101,7 +101,7 @@ string errnoWithDescription(int errNumber) {
16 char buf[kBuflen];
17 char* msg{nullptr};
18
19-#if defined(__GNUC__) && defined(_GNU_SOURCE)
20+#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__)
21 msg = strerror_r(errNumber, buf, kBuflen);
22 #elif defined(_WIN32)
23
24--
252.14.1
26