]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
quicapitest.c: Fix missing wait_until_sock_readable()
authorTomas Mraz <tomas@openssl.org>
Mon, 7 Aug 2023 17:52:32 +0000 (19:52 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 14 Aug 2023 13:54:08 +0000 (15:54 +0200)
Fixes #21624

With OPENSSL_NO_POSIX_IO or OPENSSL_NO_SOCK the function
wait_until_sock_readable() currently does not exist.

Define empty wait_until_sock_readable() when building
with no-posix-io.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21677)

test/helpers/ssltestlib.c

index 0c3a076ea91fc0b2221361ead88684f7399d41ea..01a51ac41d3275861d48f6010279dd32f577d1a1 100644 (file)
@@ -884,6 +884,7 @@ int create_ssl_ctx_pair(OSSL_LIB_CTX *libctx, const SSL_METHOD *sm,
 #define MAXLOOPS    1000000
 
 #if defined(OSSL_USE_SOCKETS)
+
 int wait_until_sock_readable(int sock)
 {
     fd_set readfds;
@@ -1011,6 +1012,14 @@ int create_ssl_objects2(SSL_CTX *serverctx, SSL_CTX *clientctx, SSL **sssl,
     BIO_free(c_to_s_bio);
     return 0;
 }
+
+#else
+
+int wait_until_sock_readable(int sock)
+{
+    return 0;
+}
+
 #endif /* defined(OSSL_USE_SOCKETS) */
 
 /*