GnuTLS: correctly pass sockets on W32 x64

This commit is contained in:
Evgeny Grin (Karlson2k)
2021-12-12 20:56:47 +03:00
parent fdf0ea88ac
commit ae6071dcd2
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -2646,7 +2646,7 @@ new_connection_prepare_ (struct MHD_Daemon *daemon,
#else /* GnuTLS before 3.1.9 or Win x64 */
gnutls_transport_set_ptr (connection->tls_session,
(gnutls_transport_ptr_t) (intptr_t) (client_socket));
#endif /* GnuTLS before 3.1.9 */
#endif /* GnuTLS before 3.1.9 or Win x64 */
#ifdef MHD_TLSLIB_NEED_PUSH_FUNC
gnutls_transport_set_push_function (connection->tls_session,
MHD_tls_push_func_);
+3 -3
View File
@@ -235,12 +235,12 @@ wr_create_tls_sckt (void)
GNUTLS_CRD_CERTIFICATE,
s->tls_crd))
{
#if GNUTLS_VERSION_NUMBER + 0 >= 0x030109
#if (GNUTLS_VERSION_NUMBER + 0 >= 0x030109) && ! defined(_WIN64)
gnutls_transport_set_int (s->tls_s, (int) (s->fd));
#else /* GnuTLS before 3.1.9 */
#else /* GnuTLS before 3.1.9 or Win x64 */
gnutls_transport_set_ptr (s->tls_s,
(gnutls_transport_ptr_t) (intptr_t) (s->fd));
#endif /* GnuTLS before 3.1.9 */
#endif /* GnuTLS before 3.1.9 or Win x64 */
return s;
}
gnutls_certificate_free_credentials (s->tls_crd);
+3 -3
View File
@@ -400,12 +400,12 @@ wr_create_tls_sckt (void)
GNUTLS_CRD_CERTIFICATE,
s->tls_crd))
{
#if GNUTLS_VERSION_NUMBER + 0 >= 0x030109
#if (GNUTLS_VERSION_NUMBER + 0 >= 0x030109) && ! defined(_WIN64)
gnutls_transport_set_int (s->tls_s, (int) (s->fd));
#else /* GnuTLS before 3.1.9 */
#else /* GnuTLS before 3.1.9 or Win x64 */
gnutls_transport_set_ptr (s->tls_s,
(gnutls_transport_ptr_t) (intptr_t) (s->fd));
#endif /* GnuTLS before 3.1.9 */
#endif /* GnuTLS before 3.1.9 or Win x64 */
return s;
}
gnutls_certificate_free_credentials (s->tls_crd);