diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 94f98589c..4bc34031d 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -570,7 +570,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 fc24755d7..5dbd097d3 100644 --- a/lib/core-net/private-lib-core-net.h +++ b/lib/core-net/private-lib-core-net.h @@ -715,7 +715,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 6c59d7d9c..93192e9b3 100644 --- a/lib/core/private-lib-core.h +++ b/lib/core/private-lib-core.h @@ -665,7 +665,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.