[Dnsmasq-discuss] v2.87test7 compile error on BSD
Johnny S. Lee
_ at jsl.io
Thu Feb 3 22:59:16 UTC 2022
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.
More information about the Dnsmasq-discuss
mailing list