diff --git a/pw3270.cbp b/pw3270.cbp
index 946d8b4..a418b3b 100644
--- a/pw3270.cbp
+++ b/pw3270.cbp
@@ -6,13 +6,13 @@
-
+
-
-
+
+
-
+
@@ -20,10 +20,10 @@
-
-
+
+
-
+
@@ -35,7 +35,7 @@
-
+
@@ -45,285 +45,285 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
diff --git a/src/lib3270/telnet.c b/src/lib3270/telnet.c
index e3f8290..e98fa2e 100644
--- a/src/lib3270/telnet.c
+++ b/src/lib3270/telnet.c
@@ -37,6 +37,11 @@
* the given IBM host.
*/
+#if defined(_WIN32)
+ #include
+ #include
+#endif
+
#include
#if defined(HAVE_LIBSSL)
#include
@@ -47,7 +52,6 @@
#include
#if defined(_WIN32)
- #include
#include
#else
#include
@@ -3163,6 +3167,18 @@ net_snap_options(void)
*/
static int non_blocking(H3270 *session, Boolean on)
{
+# if defined(FIONBIO)
+
+ int i = on ? 1 : 0;
+
+ if (SOCK_IOCTL(session->sock, FIONBIO, (int *) &i) < 0)
+ {
+ popup_a_sockerr(session, N_( "ioctl(%s)" ), "FIONBIO");
+ return -1;
+ }
+
+#else
+
int f;
if ((f = fcntl(session->sock, F_GETFL, 0)) == -1)
@@ -3182,6 +3198,8 @@ static int non_blocking(H3270 *session, Boolean on)
return -1;
}
+#endif // FIONBIO
+
return 0;
}
--
libgit2 0.21.2