1From ca004968b8d2149f72d4edcfe029489a8c5e10ca Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Sep 2019 12:31:31 -0700
4Subject: [PATCH] Mark one of strerror_r implementation glibc specific
5
6glibc has two incompatible strerror_r definitions, one of them is
7specific to glibc, mark this one so
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/mongo/util/errno_util.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/mongo/util/errno_util.cpp b/src/mongo/util/errno_util.cpp
17index 564c0071ea..4f7e1d3a38 100644
18--- a/src/mongo/util/errno_util.cpp
19+++ b/src/mongo/util/errno_util.cpp
20@@ -61,7 +61,7 @@ std::string errnoWithDescription(int errNumber) {
21     char buf[kBuflen];
22     char* msg{nullptr};
23
24-#if defined(__GNUC__) && defined(_GNU_SOURCE) && \
25+#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__) && \
26     (!defined(__ANDROID_API__) || !(__ANDROID_API__ <= 22)) && !defined(EMSCRIPTEN)
27     msg = strerror_r(errNumber, buf, kBuflen);
28 #elif defined(_WIN32)
29--
302.23.0
31
32