[Dnsmasq-discuss] Build broken on *BSD?
Simon Kelley
simon at thekelleys.org.uk
Fri Jun 20 14:51:46 UTC 2025
The same commit adds this to src/config.h
+#if !defined(HAVE_LINUX_NETWORK)
+#undef HAVE_IPSET
+#undef HAVE_NFTSET
+#endif
The change is an attempt to concentrate this sort of logic in config.h,
rather than spreading it around the source tree.
That's means that the commit shouldn't break compilation for *BSD, but
it does inadvertently disable the ipset functionality for BSD, since I
didn't take into account that BSD has an ipset implementation.
Fixed in 2b192857240827319b7f50a54be889ae884903d5
Thanks for the heads-up.
Cheers
Simon.
On 6/13/25 18:31, Harper wrote:
> Hi, I'm curious why a particular change was made in (unreleased) commit 98189ff988d01d48929057037060d8cb2b4a22a6. I've never looked at the Dnsmasq codebase before today, but I'm pretty sure that commit will break the build on *BSD platforms.
>
> Dnsmasq defines two versions of add_to_ipset(), one in ipset.c for use on Linux (where ipset actually exists), and one in tables.c for use on *BSD (where it uses the pf firewall instead of ipset).
>
> Prior to 98189ff988, ipset.c was only compiled on Linux and tables.c was only compiled on *BSD, but that commit removes the HAVE_LINUX_NETWORK preprocessor check from ipset.c, so that file will be compiled on *BSD as well, leading to duplicate definitions of add_to_ipset().
>
> Additionally, trying to build ipset.c on *BSD will cause an error when it tries to include linux/netlink.h. Similarly, the HAVE_LINUX_NETWORK preprocessor check was also removed from nftset.c, which should cause a similar error for nftables/libnftables.h.
>
> --Harper Andrews
>
> _______________________________________________
> 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