From: Giuseppe Scrivano Date: Sun, 17 Apr 2011 11:07:01 +0000 (+0200) Subject: Use correctly FIONBIO values. X-Git-Tag: v1.13~39 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=8d764f3ac6f086cee848e1181bdd80a39e8959e4 Use correctly FIONBIO values. --- diff --git a/src/ChangeLog b/src/ChangeLog index 548de629..39390a5f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-04-17 Giuseppe Scrivano + + * wget.h [HAVE_LIBSSL32]: Define HAVE_SSL. + + * gnutls.c (wgnutls_peek): Use correctly FIONBIO codes under Mingw32. + Reported by: Ray Satiro + 2011-04-13 Giuseppe Scrivano * openssl.c (openssl_poll): Check if the specified timeout is zero after diff --git a/src/gnutls.c b/src/gnutls.c index 564170fe..a1054a4d 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -197,8 +197,8 @@ wgnutls_peek (int fd, char *buf, int bufsize, void *arg) return ret; #else /* XXX: Assume it was blocking before. */ - const int zero = 0; - ret = ioctl (fd, FIONBIO, &zero); + const int one = 1; + ret = ioctl (fd, FIONBIO, &one); if (ret < 0) return ret; #endif @@ -224,8 +224,8 @@ wgnutls_peek (int fd, char *buf, int bufsize, void *arg) if (ret < 0) return ret; #else - const int one = 1; - ret = ioctl (fd, FIONBIO, &one); + const int zero = 0; + ret = ioctl (fd, FIONBIO, &zero); if (ret < 0) return ret; #endif diff --git a/src/wget.h b/src/wget.h index fce89e7a..c7c5e2cb 100644 --- a/src/wget.h +++ b/src/wget.h @@ -52,7 +52,7 @@ as that of the covered work. */ #endif /* Is OpenSSL or GNUTLS available? */ -#if defined HAVE_LIBSSL || defined HAVE_LIBGNUTLS +#if defined HAVE_LIBSSL || defined HAVE_LIBSSL32 || defined HAVE_LIBGNUTLS # define HAVE_SSL #endif