[Spice-devel] [PATCH spice-gtk] setsockopt: check for ENOTSUP only if defined

Hans de Goede hdegoede at redhat.com
Thu Apr 19 03:13:15 PDT 2012


Looks good, ack.

On 04/19/2012 10:41 AM, Uri Lublin wrote:
> For windows (mingw32) ENOTSUP is not defined.
>
> Related to 3bfadb8587f59a74d373e26385d348a105c2e425
> ---
>   gtk/spice-channel.c |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 783b94a..3952e9a 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-devel mailing list