[Dnsmasq-discuss] Build broken on *BSD?
Harper
dnsmasqdiscuss at harperandrews.org
Fri Jun 13 17:31:09 UTC 2025
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
More information about the Dnsmasq-discuss
mailing list