From 6d7b0e06a24592790a5b75945ab24e941e3c7cec Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Tue, 6 Feb 2024 12:24:49 +0000 Subject: [PATCH] QUIC POLLING: Support no-quic builds Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/23495) --- ssl/rio/poll_immediate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ssl/rio/poll_immediate.c b/ssl/rio/poll_immediate.c index d4fd62ad95..66e613a7dc 100644 --- a/ssl/rio/poll_immediate.c +++ b/ssl/rio/poll_immediate.c @@ -44,11 +44,12 @@ int SSL_poll(SSL_POLL_ITEM *items, size_t i, result_count = 0; SSL_POLL_ITEM *item; SSL *ssl; - uint64_t events, revents; + uint64_t revents; + ossl_unused uint64_t events; + ossl_unused int do_tick = ((flags & SSL_POLL_FLAG_NO_HANDLE_EVENTS) == 0); int is_immediate = (timeout != NULL && timeout->tv_sec == 0 && timeout->tv_usec == 0); - int do_tick = ((flags & SSL_POLL_FLAG_NO_HANDLE_EVENTS) == 0); /* * Prevent calls which use SSL_poll functionality which is not currently @@ -79,6 +80,7 @@ int SSL_poll(SSL_POLL_ITEM *items, break; switch (ssl->type) { +#ifndef OPENSSL_NO_QUIC case SSL_TYPE_QUIC_CONNECTION: case SSL_TYPE_QUIC_XSO: if (!ossl_quic_conn_poll_events(ssl, events, do_tick, &revents)) @@ -89,6 +91,7 @@ int SSL_poll(SSL_POLL_ITEM *items, ++result_count; break; +#endif default: ERR_raise_data(ERR_LIB_SSL, SSL_R_POLL_REQUEST_NOT_SUPPORTED, -- 2.39.5