aboutsummaryrefslogtreecommitdiffstats
path: root/community/mongodb/fix-asio-strerror_r.patch
blob: f2fe5cb1eb7e7c7d79014a7c1a8904b789d5e082 (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
https://github.com/chriskohlhoff/asio/issues/94

diff --git a/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp b/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
index 4e7badb..0eeae88 100644
--- a/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
+++ b/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
@@ -97,17 +97,14 @@ public:
 #if defined(__sun) || defined(__QNX__) || defined(__SYMBIAN32__)
     using namespace std;
     return strerror(value);
-#elif defined(__MACH__) && defined(__APPLE__) \
-  || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \
-  || defined(_AIX) || defined(__hpux) || defined(__osf__) \
-  || defined(__ANDROID__)
+#elif defined(__GLIBC__) && defined(_GNU_SOURCE)
+    char buf[256] = "";
+    return strerror_r(value, buf, sizeof(buf));
+#else
     char buf[256] = "";
     using namespace std;
     strerror_r(value, buf, sizeof(buf));
     return buf;
-#else
-    char buf[256] = "";
-    return strerror_r(value, buf, sizeof(buf));
 #endif
 #endif // defined(ASIO_WINDOWS)
   }