diff --git a/inc/lektor/net.h b/inc/lektor/net.h index 7a08be582ccf8bb6319fc46ae9273f1138d0ddad..22fe26e655116185fbd16aefb0c3c7f69f35c113 100644 --- a/inc/lektor/net.h +++ b/inc/lektor/net.h @@ -55,15 +55,18 @@ int lkt_message_send(SOCKET fd, const struct lkt_message *const msg); struct lkt_state { #if defined(LKT_OS_WIN) && (LKT_OS_WIN == 1) /* The FDS, Windob' version */ - fd_set *fds; + LPWSAPOLLFD fds; + ULONG fds_len; + ULONG fds_max; + #else /* The FDS, toaster OS version */ struct pollfd *fds; + size_t fds_len; + size_t fds_max; #endif struct lkt_client *clients; - size_t fds_len; - size_t fds_max; char host[HOST_NAME_MAX]; char port[LKT_LINE_MAX]; struct queue queue; diff --git a/src/net/listen.c b/src/net/listen.c index 92e64210182fc30b589f454aec8df4876fa3f4d7..38ba57a633f3be143866dd16f474bb2865ddd468 100644 --- a/src/net/listen.c +++ b/src/net/listen.c @@ -1110,7 +1110,11 @@ lkt_listen(struct lkt_state *srv) #endif LOG_INFO("INIT", "Signal handlers registered"); - int is_unix_socket = STR_NMATCH(srv->port, "unix", 4); +#if !(defined(LKT_OS_WIN) && (LKT_OS_WIN == 1)) + const int is_unix_socket = STR_NMATCH(srv->port, "unix", 4); +#else + const int is_unix_socket = false; +#endif unsigned int perms = 0600; /* FIXME: Use the server register, and add a socket type (which is