diff --git a/include/swoole_coroutine.h b/include/swoole_coroutine.h index ff19aff2ad..3749fd65bb 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 8fca0974b9..63f7dc90f5 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;