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

David Woodhouse dwmw2 at infradead.org
Tue Aug 26 03:18:47 PDT 2014


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...

../library.c:441:1: error: unknown type name 'SOCKET'
 SOCKET openconnect_setup_cmd_pipe(struct openconnect_info *vpninfo)
 ^

> -#ifdef _WIN32
> -#define uid_t unsigned
> -#endif
> -

You remove that here, only to add it back (twice) in your fifth patch?

-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140826/aac905f3/attachment.bin>


More information about the openconnect-devel mailing list