aboutsummaryrefslogtreecommitdiffstats
path: root/community/mongodb/fix-asio-strerror_r.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-04-21 14:15:59 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-04-21 14:44:37 +0000
commita86740d743de969471c628c71c75d6d6678ca12c (patch)
tree3413d775d1ecfdebafae7d19b6ca6232aa1dc838 /community/mongodb/fix-asio-strerror_r.patch
parent24bfdd2da0799ef4557fdc3588a701fcc0f6c8ee (diff)
downloadaports-a86740d743de969471c628c71c75d6d6678ca12c.tar.bz2
aports-a86740d743de969471c628c71c75d6d6678ca12c.tar.xz
community/mongodb: moved from testing
Diffstat (limited to 'community/mongodb/fix-asio-strerror_r.patch')
-rw-r--r--community/mongodb/fix-asio-strerror_r.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/community/mongodb/fix-asio-strerror_r.patch b/community/mongodb/fix-asio-strerror_r.patch
new file mode 100644
index 0000000000..f2fe5cb1eb
--- /dev/null
+++ b/community/mongodb/fix-asio-strerror_r.patch
@@ -0,0 +1,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)
+ }