diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c index fa34037c..52b64edb 100644 --- a/lib/lws-plat-win.c +++ b/lib/lws-plat-win.c @@ -6,7 +6,9 @@ unsigned long long time_in_microseconds() { +#ifndef DELTA_EPOCH_IN_MICROSECS #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL +#endif FILETIME filetime; ULARGE_INTEGER datetime; diff --git a/lib/service.c b/lib/service.c index fd945625..7f5aa7a3 100644 --- a/lib/service.c +++ b/lib/service.c @@ -695,7 +695,7 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t lws_plat_service_periodic(context); /* retire unused deprecated context */ -#if LWS_POSIX +#if LWS_POSIX && !defined(_WIN32) if (context->deprecated && !context->count_wsi_allocated) { lwsl_notice("%s: ending deprecated context\n", __func__); kill(getpid(), SIGINT); @@ -744,9 +744,9 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t if (context->ws_ping_pong_interval && context->last_ws_ping_pong_check_s < now + 10) { + struct lws_vhost *vh = context->vhost_list; context->last_ws_ping_pong_check_s = now; - struct lws_vhost *vh = context->vhost_list; while (vh) { for (n = 0; n < vh->count_protocols; n++) { wsi = vh->same_vh_protocol_list[n];