[Spice-commits] gtk/spice-channel.c

Uri Lublin uril at kemper.freedesktop.org
Mon Apr 23 10:17:13 PDT 2012


 gtk/spice-channel.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ecca0d18db6f7699e02519fdadb14df21c8f2409
Author: Uri Lublin <uril at redhat.com>
Date:   Sun Mar 25 16:48:59 2012 +0200

    setsockopt: check for ENOTSUP only if defined
    
    For windows (mingw32) ENOTSUP is not defined.
    
    Related to 3bfadb8587f59a74d373e26385d348a105c2e425

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index b0f2d4e..574867c 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2200,7 +2200,11 @@ ssl_reconnect:
 connected:
     rc = setsockopt(g_socket_get_fd(c->sock), IPPROTO_TCP, TCP_NODELAY,
                     (const char*)&delay_val, sizeof(delay_val));
-    if (rc != 0 && errno != ENOTSUP) {
+    if ((rc != 0)
+#ifdef ENOTSUP
+        && (errno != ENOTSUP)
+#endif
+        ) {
         g_warning("%s: could not set sockopt TCP_NODELAY: %s", c->name,
                   strerror(errno));
     }


More information about the Spice-commits mailing list