Skip to content

Commit

Permalink
Fix duplicate symbols of asio::dummy_return<void> (#15513)
Browse files Browse the repository at this point in the history
* Fix duplicate symbols of asio::dummy_return<void>

* Update ports/boost-asio/CONTROL

* Update ports/boost-asio/portfile.cmake

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
  • Loading branch information
cedral and JackBoosY authored Jan 11, 2021
1 parent 4974430 commit 56e1606
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions ports/boost-asio/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Automatically generated by scripts/boost/generate-ports.ps1
Source: boost-asio
Version: 1.75.0
Port-Version: 1
Build-Depends: boost-array, boost-assert, boost-bind, boost-chrono, boost-compatibility, boost-config, boost-coroutine (!arm&!uwp&!emscripten), boost-date-time, boost-detail, boost-function, boost-integer, boost-regex, boost-smart-ptr, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, openssl
Homepage: https://github.com/boostorg/asio
Description: Boost asio module
Expand Down
13 changes: 13 additions & 0 deletions ports/boost-asio/inline_dummy_return.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/asio/include/asio/impl/use_awaitable.hpp b/asio/include/asio/impl/use_awaitable.hpp
index 60a6f5cd..af7be635 100644
--- a/include/boost/asio/impl/use_awaitable.hpp
+++ b/include/boost/asio/impl/use_awaitable.hpp
@@ -236,7 +236,7 @@ T dummy_return()
}

template <>
-void dummy_return()
+inline void dummy_return()
{
}
#endif // defined(_MSC_VER)
4 changes: 3 additions & 1 deletion ports/boost-asio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ vcpkg_from_github(
REF boost-1.75.0
SHA512 5f332644207f87af8ffbf93d9f1f72b7ca6dfa96d77a871308951c492ae27fac20bad2bfdf4e1de06585c1405d1875c4d4335786b3fc08aa0a76ef4de3626c27
HEAD_REF master
PATCHES windows_alloca_header.patch
PATCHES
windows_alloca_header.patch
inline_dummy_return.patch
)

include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
Expand Down

0 comments on commit 56e1606

Please sign in to comment.