Skip to content
Snippets Groups Projects
Commit 68eba9f1 authored by Adrien Béraud's avatar Adrien Béraud Committed by Sébastien Blin
Browse files

contrib: update asio


Change-Id: I4ba5e23ae4bd40c8520f8e4a5a59583616b2e8aa
Reviewed-by: default avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
parent 2cbbaf79
No related branches found
No related tags found
No related merge requests found
cde4a043e24268ffbcea08c6cb5d669fc983631213fe5e7640d0ef58902f6ee2332a4e777accd2a42456eb7c65c1da9c6c0d219f54c407e190ee593d66d8a731 asio-631c4f89dafc771fcaf9ee7aa565ab33168459a6.tar.gz
76ee04cbd221bcc2f2fd0a2fc1a2f37e4b4c9996d606d6a70a437ecc77b682f0f649802bff06374dc07bc9c0213f604ec1d37ac1fca184baaf50a60e5bfedafa asio-b0926b61b057ce563241d609cae5768ed3a4e1b1.tar.gz
......@@ -3,14 +3,22 @@ Author: Adrien Béraud <adrien.beraud@savoirfairelinux.com>
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,1 @@
-if STANDALONE
-SUBDIRS = examples/cpp11 tests
-else
-SUBDIRS = examples/cpp03 tests
@@ -1,17 +1,1 @@
-if !STANDALONE
-EXAMPLES_CPP03 = examples/cpp03
-endif
-
-DIST_SUBDIRS = examples/cpp03 examples/cpp11 examples/cpp14 tests
-if HAVE_CXX11
-EXAMPLES_CPP11 = examples/cpp11
-endif
-
-if HAVE_CXX14
-EXAMPLES_CPP14 = examples/cpp14
-endif
-
-SUBDIRS = $(EXAMPLES_CPP03) $(EXAMPLES_CPP11) $(EXAMPLES_CPP14) tests
-
-DIST_SUBDIRS = examples/cpp03 examples/cpp11 examples/cpp14 examples/cpp17 tests
-
EXTRA_DIST = \
From 96147deb227697c9942ff6c6b47efa63fabd7ca9 Mon Sep 17 00:00:00 2001
From: Adrien Beraud <adrien.beraud@savoirfairelinux.com>
Date: Wed, 19 Jul 2017 14:00:20 -0400
Subject: [PATCH] revert: Android API level 21 or later is required for
pthread_condattr_setclock.
partial revert from commit ca6aa0cd38ee801e54935371bd11b503edb926e8
---
asio/include/asio/detail/impl/posix_event.ipp | 5 +----
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/include/asio/detail/posix_event.hpp b/include/asio/detail/posix_event.hpp
index 57acc6da..62d04257 100644
--- a/include/asio/detail/posix_event.hpp
+++ b/include/asio/detail/posix_event.hpp
@@ -116,14 +116,12 @@ public:
{
state_ += 2;
timespec ts;
-#if (defined(__MACH__) && defined(__APPLE__)) \
- || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
+#if (defined(__MACH__) && defined(__APPLE__))
ts.tv_sec = usec / 1000000;
ts.tv_nsec = (usec % 1000000) * 1000;
::pthread_cond_timedwait_relative_np(
&cond_, &lock.mutex().mutex_, &ts); // Ignore EINVAL.
#else // (defined(__MACH__) && defined(__APPLE__))
- // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
if (::clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
{
ts.tv_sec += usec / 1000000;
@@ -134,7 +132,6 @@ public:
&lock.mutex().mutex_, &ts); // Ignore EINVAL.
}
#endif // (defined(__MACH__) && defined(__APPLE__))
- // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
state_ -= 2;
}
return (state_ & 1) != 0;
--
2.11.0
......@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
ASIO_VERSION := 631c4f89dafc771fcaf9ee7aa565ab33168459a6
ASIO_VERSION := b0926b61b057ce563241d609cae5768ed3a4e1b1
ASIO_URL := https://github.com/hlysunnaram/asio/archive/$(ASIO_VERSION).tar.gz
# Pure dependency of restbed: do not add to PKGS.
......@@ -29,7 +29,6 @@ $(TARBALLS)/asio-$(ASIO_VERSION).tar.gz:
asio: asio-$(ASIO_VERSION).tar.gz
$(UNPACK)
mv asio-$(ASIO_VERSION)/asio/* asio-$(ASIO_VERSION)/ && rm -rf asio-$(ASIO_VERSION)/asio
$(APPLY) $(SRC)/asio/revert_pthread_condattr_setclock.patch
$(APPLY) $(SRC)/asio/no_tests_examples.patch
$(MOVE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment