X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fopenssl.c;h=9bc59a5ce606d3e2f8984acfb6ec3ee629b2796f;hp=1823f5935655a15a4b8d92279a9cb5129acb63c2;hb=b76ef3f452e9d84a86c667bd85d26f90f14e8860;hpb=5a97871f5d737c5c616b239b9bc0a346177c9be3 diff --git a/src/openssl.c b/src/openssl.c index 1823f593..9bc59a5c 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -364,11 +364,7 @@ openssl_close (int fd, void *arg) xfree_null (ctx->last_error); xfree (ctx); -#if defined(WINDOWS) || defined(USE_WATT32) - closesocket (fd); -#else close (fd); -#endif DEBUGP (("Closed %d/SSL 0x%0*lx\n", fd, PTR_FORMAT (conn))); } @@ -401,7 +397,10 @@ ssl_connect_wget (int fd) conn = SSL_new (ssl_ctx); if (!conn) goto error; - if (!SSL_set_fd (conn, fd)) +#ifndef FD_TO_SOCKET +# define FD_TO_SOCKET(x) (x) +#endif + if (!SSL_set_fd (conn, FD_TO_SOCKET (fd))) goto error; SSL_set_connect_state (conn); if (SSL_connect (conn) <= 0 || conn->state != SSL_ST_OK)