win32 fixes

https://github.com/warmcat/libwebsockets/issues/750
This commit is contained in:
Andy Green 2017-01-17 06:51:11 +08:00
parent 3f55e5e964
commit e680fb9193
2 changed files with 4 additions and 2 deletions

View file

@ -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;

View file

@ -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];