[Libwebsockets] Building on FreeBSD

"Andy Green (林安廸)" andy at warmcat.com
Tue Jan 29 00:01:49 CET 2013


On 25/01/13 06:38, the mail apparently from Matthieu Riviere included:
> Hi,
>
> Attached patch was sufficient to make libwebsockets build on FreeBSD.
>
> Test server and client seem to build and run fine on 9.0-RELEASE
> (amd64), though I haven't tested much beyond that yet.

Thanks a lot for the patch, it's committed here

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=5e1b7fff3a78ea9c6bfbd03c9d715018dc7a9669

Apple users contributed patches before, so I guess it is not far from 
being OK on actual FreeBSD.

-Andy

> --
> Matthieu
>
>
> ---
>   lib/client-handshake.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/client-handshake.c b/lib/client-handshake.c
> index f4668bc..3b5a00d 100644
> --- a/lib/client-handshake.c
> +++ b/lib/client-handshake.c
> @@ -12,7 +12,7 @@ struct libwebsocket *__libwebsocket_client_connect_2(
>   	int plen = 0;
>   	char pkt[512];
>   	int opt = 1;
> -#if defined(__APPLE__)
> +#if defined(__APPLE__) || defined(__FreeBSD__)
>   	struct protoent *tcp_proto;
>   #endif
>
> @@ -63,7 +63,7 @@ struct libwebsocket *__libwebsocket_client_connect_2(
>   	bzero(&server_addr.sin_zero, 8);
>
>   	/* Disable Nagle */
> -#if !defined(__APPLE__)
> +#if !defined(__APPLE__) && !defined(__FreeBSD__)
>   	setsockopt(wsi->sock, SOL_TCP, TCP_NODELAY,
>   					      (const void *)&opt, sizeof(opt));
>   #else
>




More information about the Libwebsockets mailing list