&wsi->w_read.uv_watcher, wsi->desc.sockfd);
if (n) {
lwsl_err("uv_poll_init failed %d, sockfd=%p\n",
- n, (void *)(long)wsi->desc.sockfd);
+ n, (void *)(lws_intptr_t)wsi->desc.sockfd);
return -1;
}
static void
lws_libuv_closewsi_m(uv_handle_t* handle)
{
- lws_sockfd_type sockfd = (lws_sockfd_type)(long long)handle->data;
+ lws_sockfd_type sockfd = (lws_sockfd_type)(lws_intptr_t)handle->data;
compatible_close(sockfd);
}
{
uv_handle_t *h = (void *)&wsi->w_read.uv_watcher;
- h->data = (void *)(long long)wsi->desc.sockfd;
+ h->data = (void *)(lws_intptr_t)wsi->desc.sockfd;
/* required to defer actual deletion until libuv has processed it */
uv_close((uv_handle_t*)&wsi->w_read.uv_watcher, lws_libuv_closewsi_m);
}