]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC POLLING: Support no-quic builds
authorHugo Landau <hlandau@openssl.org>
Tue, 6 Feb 2024 12:24:49 +0000 (12:24 +0000)
committerHugo Landau <hlandau@openssl.org>
Sat, 10 Feb 2024 11:37:14 +0000 (11:37 +0000)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23495)

ssl/rio/poll_immediate.c

index d4fd62ad951c0186dd872a21957d6e549e4975eb..66e613a7dcdcd9ef52ed457d525c0335d5abe252 100644 (file)
@@ -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,