From 68eba9f1b4b0bb273c67fb6686349fbe78d57fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Fri, 11 May 2018 15:58:56 -0400 Subject: [PATCH] contrib: update asio Change-Id: I4ba5e23ae4bd40c8520f8e4a5a59583616b2e8aa Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com> --- contrib/src/asio/SHA512SUMS | 2 +- contrib/src/asio/no_tests_examples.patch | 20 ++++++--- .../revert_pthread_condattr_setclock.patch | 42 ------------------- contrib/src/asio/rules.mak | 3 +- 4 files changed, 16 insertions(+), 51 deletions(-) delete mode 100644 contrib/src/asio/revert_pthread_condattr_setclock.patch diff --git a/contrib/src/asio/SHA512SUMS b/contrib/src/asio/SHA512SUMS index 1eb007c3d0..05c49ef86e 100644 --- a/contrib/src/asio/SHA512SUMS +++ b/contrib/src/asio/SHA512SUMS @@ -1 +1 @@ -cde4a043e24268ffbcea08c6cb5d669fc983631213fe5e7640d0ef58902f6ee2332a4e777accd2a42456eb7c65c1da9c6c0d219f54c407e190ee593d66d8a731 asio-631c4f89dafc771fcaf9ee7aa565ab33168459a6.tar.gz +76ee04cbd221bcc2f2fd0a2fc1a2f37e4b4c9996d606d6a70a437ecc77b682f0f649802bff06374dc07bc9c0213f604ec1d37ac1fca184baaf50a60e5bfedafa asio-b0926b61b057ce563241d609cae5768ed3a4e1b1.tar.gz diff --git a/contrib/src/asio/no_tests_examples.patch b/contrib/src/asio/no_tests_examples.patch index f9962d03bd..23ed319bba 100644 --- a/contrib/src/asio/no_tests_examples.patch +++ b/contrib/src/asio/no_tests_examples.patch @@ -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 = \ diff --git a/contrib/src/asio/revert_pthread_condattr_setclock.patch b/contrib/src/asio/revert_pthread_condattr_setclock.patch deleted file mode 100644 index eeee7075e1..0000000000 --- a/contrib/src/asio/revert_pthread_condattr_setclock.patch +++ /dev/null @@ -1,42 +0,0 @@ -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 - diff --git a/contrib/src/asio/rules.mak b/contrib/src/asio/rules.mak index d933a6db55..36179f8641 100644 --- a/contrib/src/asio/rules.mak +++ b/contrib/src/asio/rules.mak @@ -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) -- GitLab