aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/co/fix-event-destruct.patch13
-rw-r--r--ports/co/portfile.cmake1
-rw-r--r--ports/co/vcpkg.json1
3 files changed, 15 insertions, 0 deletions
diff --git a/ports/co/fix-event-destruct.patch b/ports/co/fix-event-destruct.patch
new file mode 100644
index 000000000..b5abc57e7
--- /dev/null
+++ b/ports/co/fix-event-destruct.patch
@@ -0,0 +1,13 @@
+diff --git a/src/co/co.cc b/src/co/co.cc
+index 8921296..838ac16 100644
+--- a/src/co/co.cc
++++ b/src/co/co.cc
+@@ -8,7 +8,7 @@ namespace co {
+ class EventImpl {
+ public:
+ EventImpl() : _counter(0), _signaled(false), _has_cond(false) {}
+- ~EventImpl() { co::xx::cond_destroy(&_cond); }
++ ~EventImpl() { if (_has_cond) co::xx::cond_destroy(&_cond); }
+
+ bool wait(uint32 ms);
+
diff --git a/ports/co/portfile.cmake b/ports/co/portfile.cmake
index 08ed5d4a3..9e7dd7e19 100644
--- a/ports/co/portfile.cmake
+++ b/ports/co/portfile.cmake
@@ -10,6 +10,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
install-dll.patch
+ fix-event-destruct.patch
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
diff --git a/ports/co/vcpkg.json b/ports/co/vcpkg.json
index 1fcc2b0dc..e9f94ed5f 100644
--- a/ports/co/vcpkg.json
+++ b/ports/co/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "co",
"version-semver": "2.0.2",
+ "port-version": 1,
"description": "A go-style coroutine library in C++11 and more",
"homepage": "https://github.com/idealvin/co",
"supports": "!uwp & !(arm & windows)",