fix clang 10 build with try_lock -> try_to_lock; tested on amd64; GitHub PR #2672
This commit is contained in:
parent
6ebd9b8226
commit
8cfbe14845
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2019/07/14 02:16:51 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2020/08/20 17:32:37 thfr Exp $
|
||||
|
||||
COMMENT = open source game engine based on FreeSpace 2
|
||||
|
||||
V = 3.8.0
|
||||
DISTNAME = fs2_open_${V:S/./_/g}-source-Unix
|
||||
PKGNAME = fs2open-${V}
|
||||
REVISION = 2
|
||||
REVISION = 3
|
||||
|
||||
CATEGORIES = games
|
||||
|
||||
@ -44,6 +44,9 @@ NO_TEST = Yes
|
||||
|
||||
WRKDIST = ${WRKDIR}/fs2open.github.com
|
||||
|
||||
pre-patch:
|
||||
@cd ${WRKSRC} && perl -i -pe 's/\r$$//' code/utils/boost/syncboundedqueue.h
|
||||
|
||||
post-install:
|
||||
${SUBST_CMD} -c -m 755 ${FILESDIR}/fs2open ${PREFIX}/bin/fs2open
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-code_utils_boost_syncboundedqueue_h,v 1.1 2020/08/20 17:32:37 thfr Exp $
|
||||
|
||||
fix clang 10 build
|
||||
|
||||
Index: code/utils/boost/syncboundedqueue.h
|
||||
--- code/utils/boost/syncboundedqueue.h.orig
|
||||
+++ code/utils/boost/syncboundedqueue.h
|
||||
@@ -276,7 +276,7 @@ queue_op_status sync_bounded_queue<ValueType>::try_pul
|
||||
template <typename ValueType>
|
||||
queue_op_status sync_bounded_queue<ValueType>::nonblocking_pull_front(ValueType& elem)
|
||||
{
|
||||
- std::unique_lock<std::mutex> lk(mtx_, std::try_lock);
|
||||
+ std::unique_lock<std::mutex> lk(mtx_, std::try_to_lock);
|
||||
if (!lk.owns_lock())
|
||||
{
|
||||
return queue_op_status::busy;
|
||||
@@ -388,7 +388,7 @@ queue_op_status sync_bounded_queue<ValueType>::wait_pu
|
||||
template <typename ValueType>
|
||||
queue_op_status sync_bounded_queue<ValueType>::nonblocking_push_back(const ValueType& elem)
|
||||
{
|
||||
- std::unique_lock<std::mutex> lk(mtx_, std::try_lock);
|
||||
+ std::unique_lock<std::mutex> lk(mtx_, std::try_to_lock);
|
||||
if (!lk.owns_lock()) return queue_op_status::busy;
|
||||
return try_push_back(elem, lk);
|
||||
}
|
||||
@@ -452,7 +452,7 @@ queue_op_status sync_bounded_queue<ValueType>::wait_pu
|
||||
template <typename ValueType>
|
||||
queue_op_status sync_bounded_queue<ValueType>::nonblocking_push_back(ValueType&& elem)
|
||||
{
|
||||
- std::unique_lock<std::mutex> lk(mtx_, std::try_lock);
|
||||
+ std::unique_lock<std::mutex> lk(mtx_, std::try_to_lock);
|
||||
if (!lk.owns_lock())
|
||||
{
|
||||
return queue_op_status::busy;
|
Loading…
x
Reference in New Issue
Block a user