From 1678322e18fc39aac3316178501e7bb110b99a53 Mon Sep 17 00:00:00 2001 From: MARiA so cute <33935209+NathanFreeman@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:29:46 +0800 Subject: [PATCH] Fix compiler error --- include/swoole_coroutine.h | 3 +++ src/os/async_thread.cc | 1 + 2 files changed, 4 insertions(+) diff --git a/include/swoole_coroutine.h b/include/swoole_coroutine.h index ff19aff2ad2..3749fd65bb9 100644 --- a/include/swoole_coroutine.h +++ b/include/swoole_coroutine.h @@ -32,6 +32,9 @@ #include #include #include +#ifdef SW_USE_THREAD_CONTEXT +#include +#endif typedef std::chrono::microseconds seconds_type; diff --git a/src/os/async_thread.cc b/src/os/async_thread.cc index 8fca0974b9b..63f7dc90f51 100644 --- a/src/os/async_thread.cc +++ b/src/os/async_thread.cc @@ -31,6 +31,7 @@ #include #include #include +#include static std::mutex async_thread_lock; static std::shared_ptr async_thread_pool;