diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 1d92b3905..a8dd72096 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -560,7 +560,7 @@ just_kill_connection: lwsl_wsi_debug(wsi, "real just_kill_connection A: (sockfd %d)", wsi->desc.sockfd); -#if defined(LWS_WITH_THREADPOOL) +#if defined(LWS_WITH_THREADPOOL) && defined(LWS_HAVE_PTHREAD_H) lws_threadpool_wsi_closing(wsi); #endif diff --git a/lib/core-net/private-lib-core-net.h b/lib/core-net/private-lib-core-net.h index 4fb99cdf7..0b3561f74 100644 --- a/lib/core-net/private-lib-core-net.h +++ b/lib/core-net/private-lib-core-net.h @@ -706,7 +706,7 @@ struct lws { lws_log_cx_t *log_cx; -#if defined(LWS_WITH_THREADPOOL) +#if defined(LWS_WITH_THREADPOOL) && defined(LWS_HAVE_PTHREAD_H) lws_dll2_owner_t tp_task_owner; /* struct lws_threadpool_task */ #endif diff --git a/lib/core/private-lib-core.h b/lib/core/private-lib-core.h index 8ba08520d..6cdc91cff 100644 --- a/lib/core/private-lib-core.h +++ b/lib/core/private-lib-core.h @@ -625,7 +625,7 @@ struct lws_context { mbedtls_ctr_drbg_context mcdc; #endif -#if defined(LWS_WITH_THREADPOOL) +#if defined(LWS_WITH_THREADPOOL) && defined(LWS_HAVE_PTHREAD_H) struct lws_threadpool *tp_list_head; #endif diff --git a/lib/roles/pipe/ops-pipe.c b/lib/roles/pipe/ops-pipe.c index 4d39d311d..ad54a04fa 100644 --- a/lib/roles/pipe/ops-pipe.c +++ b/lib/roles/pipe/ops-pipe.c @@ -60,7 +60,7 @@ rops_handle_POLLIN_pipe(struct lws_context_per_thread *pt, struct lws *wsi, return LWS_HPI_RET_PLEASE_CLOSE_ME; #endif -#if defined(LWS_WITH_THREADPOOL) +#if defined(LWS_WITH_THREADPOOL) && defined(LWS_HAVE_PTHREAD_H) /* * threadpools that need to call for on_writable callbacks do it by * marking the task as needing one for its wsi, then cancelling service.