diff --git a/mongoose.c b/mongoose.c index 594c622b..94cd5818 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4577,7 +4577,7 @@ void mg_tls_free(struct mg_connection *c) { size_t mg_tls_pending(struct mg_connection *c) { struct mg_tls *tls = (struct mg_tls *) c->tls; - return tls == NULL ? 0 : SSL_pending(tls->ssl); + return tls == NULL ? 0 : (size_t) SSL_pending(tls->ssl); } long mg_tls_recv(struct mg_connection *c, void *buf, size_t len) { diff --git a/src/tls_openssl.c b/src/tls_openssl.c index 2c482a3e..e537e038 100644 --- a/src/tls_openssl.c +++ b/src/tls_openssl.c @@ -143,7 +143,7 @@ void mg_tls_free(struct mg_connection *c) { size_t mg_tls_pending(struct mg_connection *c) { struct mg_tls *tls = (struct mg_tls *) c->tls; - return tls == NULL ? 0 : SSL_pending(tls->ssl); + return tls == NULL ? 0 : (size_t) SSL_pending(tls->ssl); } long mg_tls_recv(struct mg_connection *c, void *buf, size_t len) {