]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
socket: set pull/push functions on windows
authorZoltan Fridrich <zfridric@redhat.com>
Wed, 1 Feb 2023 12:29:34 +0000 (13:29 +0100)
committerZoltan Fridrich <zfridric@redhat.com>
Mon, 6 Feb 2023 08:39:25 +0000 (09:39 +0100)
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
src/socket.c

index 3a6993553ec359315ec64a4fbace1595290724e3..953d63f767bc45034e513db55f39d6900f8e74d9 100644 (file)
@@ -613,7 +613,17 @@ socket_open2(socket_st * hd, const char *hostname, const char *service,
                                    (hd->session, wrap_pull_timeout_func);
                                gnutls_transport_set_ptr(hd->session, hd);
                        } else {
+#ifdef _WIN32
+                               gnutls_transport_set_push_function(hd->session,
+                                                                  wrap_push);
+                               gnutls_transport_set_pull_function(hd->session,
+                                                                  wrap_pull);
+                               gnutls_transport_set_pull_timeout_function
+                                   (hd->session, wrap_pull_timeout_func);
+                               gnutls_transport_set_ptr(hd->session, hd);
+#else
                                gnutls_transport_set_int(hd->session, hd->fd);
+#endif
                        }
                }