Fix erroneous SO suffix in darwin64-debug-test-64-clang target
[openssl.git] / apps / apps.c
index 89f43406bf346fa38d1bf0a2a2cc40772743e0b4..c6b70d63a870b5da7b902df5a01be5edc4926e47 100644 (file)
@@ -2884,3 +2884,17 @@ BIO *bio_open_default_quiet(const char *filename, char mode, int format)
     return bio_open_default_(filename, mode, format, 1);
 }
 
+void wait_for_async(SSL *s)
+{
+    int width, fd;
+    fd_set asyncfds;
+
+    fd = SSL_get_async_wait_fd(s);
+    if (fd < 0)
+        return;
+
+    width = fd + 1;
+    FD_ZERO(&asyncfds);
+    openssl_fdset(fd, &asyncfds);
+    select(width, (void *)&asyncfds, NULL, NULL, NULL);
+}