Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From a4dfc92ff342e59596ab64267a8d4f22f173c23b Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 2 Sep 2017 12:40:41 -0700 |
| 4 | Subject: [PATCH 1/4] Use strerror_r only on glibc systems |
| 5 | |
| 6 | Signed-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 | |
| 11 | diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp |
| 12 | index 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 | -- |
| 25 | 2.14.1 |
| 26 | |