Skip to content

Commit

Permalink
Backport upsteam patch for beast core.
Browse files Browse the repository at this point in the history
The beast module fails to build with clang16+/ gcc13+, it was fixed in boostorg/beast@72c2eeb
See more in GitHub issue: boostorg/beast#2648 (comment)

While here, sync OS versions checks with ports to apply llvm usage
  • Loading branch information
fluffykhv committed Sep 8, 2023
1 parent f782528 commit 16c9e6c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devel/boost-all/compiled.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ MAKE_ARGS+= pch=off

.include <bsd.port.options.mk>

.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400000 && ${OSVERSION} < 1400079
.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1500000 || \
(${OSVERSION} >= 1400000 && ${OSVERSION} < 1400097))
USES+= llvm:build
CC= ${_LLVM_MK_PREFIX}/bin/clang
CPP= ${_LLVM_MK_PREFIX}/bin/clang-cpp
Expand Down
33 changes: 33 additions & 0 deletions devel/boost-libs/files/patch-boost_beast_ssl_ssl__stream.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 72c2eeb3980ed0dc530de9241e25b247517de018 Mon Sep 17 00:00:00 2001
From: Klemens Morgenstern <klemens.d.morgenstern@gmail.com>
Date: Fri, 12 May 2023 22:40:31 +0800
Subject: [PATCH] ssl_stream doesn't use BOOST_BEAST_ASYNC_TPARAM1 due to clang
errors.
Closes #2661
---
boost/beast/ssl/ssl_stream.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git boost/beast/ssl/ssl_stream.hpp boost/beast/ssl/ssl_stream.hpp
index 7c4183a525..452320b722 100644
--- boost/beast/ssl/ssl_stream.hpp
+++ boost/beast/ssl/ssl_stream.hpp
@@ -673,7 +673,7 @@ class ssl_stream
ssl_stream<SyncStream>& stream,
boost::system::error_code& ec);
- template<class AsyncStream, BOOST_BEAST_ASYNC_TPARAM1 TeardownHandler>
+ template<class AsyncStream, typename TeardownHandler>
friend
void
async_teardown(
@@ -697,7 +697,7 @@ teardown(
}
template<class AsyncStream,
- BOOST_BEAST_ASYNC_TPARAM1 TeardownHandler = net::default_completion_token_t<beast::executor_type<AsyncStream>>>
+ typename TeardownHandler = net::default_completion_token_t<beast::executor_type<AsyncStream>>>
void
async_teardown(
boost::beast::role_type role,

0 comments on commit 16c9e6c

Please sign in to comment.