[Dnsmasq-discuss] v2.87test7 compile error on BSD

Simon Kelley simon at thekelleys.org.uk
Thu Feb 3 23:43:50 UTC 2022


Looks like a good fix to me.


Patch applied.


Simon.


On 03/02/2022 22:59, Johnny S. Lee via Dnsmasq-discuss wrote:
> The following error occurred when compiling on FreeBSD 13
> 
>      dhcp.c:461:60: error: incompatible operand types ('in_addr_t' (aka
> 'unsigned int') and 'struct in_addr')
>            dest.sin_addr.s_addr = (ntohs(mess->flags) & 0x8000) ?
> INADDR_BROADCAST : mess->yiaddr;
>                                                                 ^
> ~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~
> 
> Changing the line to the following code
> 
>        if (ntohs(mess->flags) & 0x8000)
>          dest.sin_addr.s_addr = INADDR_BROADCAST;
>        else
>          dest.sin_addr = mess->yiaddr;
> 
> fixes it, but I'm not sure if that's correct or not.
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list