summaryrefslogtreecommitdiff
path: root/bufferevent_openssl.c
diff options
context:
space:
mode:
authorokhowang(王沛文) <okhowang@tencent.com>2020-07-25 17:17:46 +0800
committerAzat Khuzhin <azat@libevent.org>2020-09-09 00:48:03 +0300
commitf07898e3bc1d12fb91bb553916b27b78eb86d96a (patch)
treeb7c7e5026f1315e42742d4a57d2f9a5d3644a86e /bufferevent_openssl.c
parenta18301a2bb160ff7c3ffaf5b7653c39ffe27b385 (diff)
downloadlibevent-f07898e3bc1d12fb91bb553916b27b78eb86d96a.tar.gz
bufferevent_openssl: fix -Wcast-function-type for SSL_pending
Introduced-in: #1028
Diffstat (limited to 'bufferevent_openssl.c')
-rw-r--r--bufferevent_openssl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c
index 2fb6c252..34259ce5 100644
--- a/bufferevent_openssl.c
+++ b/bufferevent_openssl.c
@@ -392,6 +392,11 @@ be_openssl_bio_set_fd(struct bufferevent_ssl *bev_ssl, evutil_socket_t fd)
return 0;
}
+static size_t SSL_pending_wrap(void *ssl)
+{
+ return SSL_pending(ssl);
+}
+
static struct le_ssl_ops le_openssl_ops = {
SSL_init,
SSL_context_free,
@@ -399,7 +404,7 @@ static struct le_ssl_ops le_openssl_ops = {
(int (*)(void *))SSL_renegotiate,
openssl_write,
openssl_read,
- (size_t(*)(void *))SSL_pending,
+ SSL_pending_wrap,
(int (*)(void *))SSL_do_handshake,
(int (*)(void *, int))SSL_get_error,
ERR_clear_error,