[PATCH 1/6] use windows types and return codes for socket errors

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue Aug 26 05:52:54 PDT 2014


On Tue, Aug 26, 2014 at 12:18 PM, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Thu, 2014-08-21 at 16:38 +0200, Nikos Mavrogiannopoulos wrote:
>> diff --git a/library.c b/library.c
>> index 0e77c3b..8edf4c2 100644
>> --- a/library.c
>> +++ b/library.c
>> @@ -432,21 +432,28 @@ void openconnect_set_cancel_fd(struct openconnect_info *vpninfo, int fd)
>>       vpninfo->cmd_fd = fd;
>>  }
>>
>> -int openconnect_setup_cmd_pipe(struct openconnect_info *vpninfo)
>> +#ifdef _WIN32
>> +# define CMD_PIPE_ERR INVALID_SOCKET
>> +#else
>> +# define CMD_PIPE_ERR -EIO
>> +#endif
>> +
>> +SOCKET openconnect_setup_cmd_pipe(struct openconnect_info *vpninfo)
>
> That's not defined in the non-Windows case now...

I should have tested that. Should I add it in openconnect-internal.h?

regards,
Nikos



More information about the openconnect-devel mailing list