diff --git a/CMakeLists.txt b/CMakeLists.txt index c948f6a2f..68f49f339 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -327,7 +327,7 @@ set(PACKAGE "libwebsockets") set(CPACK_PACKAGE_NAME "${PACKAGE}") set(CPACK_PACKAGE_VERSION_MAJOR "4") set(CPACK_PACKAGE_VERSION_MINOR "0") -set(CPACK_PACKAGE_VERSION_PATCH "13") +set(CPACK_PACKAGE_VERSION_PATCH "14") set(CPACK_PACKAGE_RELEASE 1) set(CPACK_GENERATOR "RPM") set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 062f410ca..a4a907904 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -487,7 +487,7 @@ just_kill_connection: #endif { lwsl_info("%s: shutdown conn: %p (sk %d, state 0x%x)\n", - __func__, wsi, (int)(long)wsi->desc.sockfd, + __func__, wsi, (int)(lws_intptr_t)wsi->desc.sockfd, lwsi_state(wsi)); if (!wsi->socket_is_permanently_unusable && lws_socket_is_valid(wsi->desc.sockfd)) { diff --git a/lib/core-net/dummy-callback.c b/lib/core-net/dummy-callback.c index 2089ffcbd..77e2ab12c 100644 --- a/lib/core-net/dummy-callback.c +++ b/lib/core-net/dummy-callback.c @@ -816,7 +816,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason, #if LWS_MAX_SMP > 1 case LWS_CALLBACK_GET_THREAD_ID: - return (int)(unsigned long long)pthread_self(); + return (int)(lws_intptr_t)pthread_self(); #endif default: diff --git a/lib/core-net/output.c b/lib/core-net/output.c index 0865bf1e9..7c25ae12f 100644 --- a/lib/core-net/output.c +++ b/lib/core-net/output.c @@ -366,7 +366,7 @@ lws_ssl_capable_write_no_ssl(struct lws *wsi, unsigned char *buf, int len) } else #endif if (wsi->role_ops->file_handle) - n = write((int)(long long)wsi->desc.filefd, buf, len); + n = write((int)(lws_intptr_t)wsi->desc.filefd, buf, len); else n = send(wsi->desc.sockfd, (char *)buf, len, MSG_NOSIGNAL); // lwsl_info("%s: sent len %d result %d", __func__, len, n); diff --git a/lib/event-libs/libuv/libuv.c b/lib/event-libs/libuv/libuv.c index 378a5dc6f..0786d5534 100644 --- a/lib/event-libs/libuv/libuv.c +++ b/lib/event-libs/libuv/libuv.c @@ -622,7 +622,7 @@ elops_accept_uv(struct lws *wsi) if (wsi->role_ops->file_handle) uv_poll_init(pt->uv.io_loop, wsi->w_read.uv.pwatcher, - (int)(long long)wsi->desc.filefd); + (int)(lws_intptr_t)wsi->desc.filefd); else uv_poll_init_socket(pt->uv.io_loop, wsi->w_read.uv.pwatcher, diff --git a/lib/tls/openssl/openssl-client.c b/lib/tls/openssl/openssl-client.c index e4d33d899..985a63f3a 100644 --- a/lib/tls/openssl/openssl-client.c +++ b/lib/tls/openssl/openssl-client.c @@ -259,7 +259,7 @@ lws_ssl_client_bio_create(struct lws *wsi) #endif #endif /* USE_WOLFSSL */ - wsi->tls.client_bio = BIO_new_socket((int)(long long)wsi->desc.sockfd, + wsi->tls.client_bio = BIO_new_socket((int)(lws_intptr_t)wsi->desc.sockfd, BIO_NOCLOSE); SSL_set_bio(wsi->tls.ssl, wsi->tls.client_bio, wsi->tls.client_bio); diff --git a/lib/tls/openssl/openssl-server.c b/lib/tls/openssl/openssl-server.c index 9adfbb891..1b0eb3d25 100644 --- a/lib/tls/openssl/openssl-server.c +++ b/lib/tls/openssl/openssl-server.c @@ -570,7 +570,7 @@ lws_tls_server_new_nonblocking(struct lws *wsi, lws_sockfd_type accept_fd) } SSL_set_ex_data(wsi->tls.ssl, openssl_websocket_private_data_index, wsi); - SSL_set_fd(wsi->tls.ssl, (int)(long long)accept_fd); + SSL_set_fd(wsi->tls.ssl, (int)(lws_intptr_t)accept_fd); #ifdef USE_WOLFSSL #ifdef USE_OLD_CYASSL diff --git a/plugins/deaddrop/protocol_lws_deaddrop.c b/plugins/deaddrop/protocol_lws_deaddrop.c index 9431a0fe3..b36532743 100644 --- a/plugins/deaddrop/protocol_lws_deaddrop.c +++ b/plugins/deaddrop/protocol_lws_deaddrop.c @@ -306,7 +306,7 @@ file_upload_cb(void *data, const char *name, const char *filename, if (pss->file_length > pss->vhd->max_size) { pss->response_code = HTTP_STATUS_REQ_ENTITY_TOO_LARGE; - close((int)(long long)pss->fd); + close((int)(lws_intptr_t)pss->fd); pss->fd = LWS_INVALID_FILE; unlink(pss->filename); @@ -314,7 +314,7 @@ file_upload_cb(void *data, const char *name, const char *filename, } if (pss->fd != LWS_INVALID_FILE) { - n = write((int)(long long)pss->fd, buf, len); + n = write((int)(lws_intptr_t)pss->fd, buf, len); lwsl_debug("%s: write %d says %d\n", __func__, len, n); lws_set_timeout(pss->wsi, PENDING_TIMEOUT_HTTP_CONTENT, 30); @@ -324,7 +324,7 @@ file_upload_cb(void *data, const char *name, const char *filename, break; if (pss->fd != LWS_INVALID_FILE) - close((int)(long long)pss->fd); + close((int)(lws_intptr_t)pss->fd); /* the temp filename without the ~ */ lws_strncpy(filename2, pss->filename, sizeof(filename2)); diff --git a/plugins/protocol_post_demo.c b/plugins/protocol_post_demo.c index d918ba4c3..f0e266608 100644 --- a/plugins/protocol_post_demo.c +++ b/plugins/protocol_post_demo.c @@ -94,7 +94,7 @@ file_upload_cb(void *data, const char *name, const char *filename, return 1; #if !defined(LWS_WITH_ESP32) - n = write((int)(long long)pss->fd, buf, len); + n = write((int)(lws_intptr_t)pss->fd, buf, len); lwsl_info("%s: write %d says %d\n", __func__, len, n); #else lwsl_notice("%s: Received chunk size %d\n", __func__, len); @@ -103,7 +103,7 @@ file_upload_cb(void *data, const char *name, const char *filename, if (state == LWS_UFS_CONTENT) break; #if !defined(LWS_WITH_ESP32) - close((int)(long long)pss->fd); + close((int)(lws_intptr_t)pss->fd); pss->fd = LWS_INVALID_FILE; #endif break;